org.apache.commons.betwixt.strategy
Class ValueSuppressionStrategy

java.lang.Object
  extended byorg.apache.commons.betwixt.strategy.ValueSuppressionStrategy

public abstract class ValueSuppressionStrategy
extends java.lang.Object

Determines whether the expression of an attribute with a values should be suppressed.

Since:
0.7
Author:
Jakarta Commons Team, Apache Software Foundation

Field Summary
static ValueSuppressionStrategy ALLOW_ALL_VALUES
          Strategy allows all values to be expressed for all attributes
static ValueSuppressionStrategy DEFAULT
          Default strategy is SUPPRESS_EMPTY.
static ValueSuppressionStrategy SUPPRESS_EMPTY
          Suppresses all null values.
 
Constructor Summary
ValueSuppressionStrategy()
           
 
Method Summary
abstract  boolean suppressAttribute(AttributeDescriptor attributeDescriptor, java.lang.String value)
          Should the given attribute value be suppressed?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_ALL_VALUES

public static final ValueSuppressionStrategy ALLOW_ALL_VALUES
Strategy allows all values to be expressed for all attributes


SUPPRESS_EMPTY

public static final ValueSuppressionStrategy SUPPRESS_EMPTY
Suppresses all null values.


DEFAULT

public static final ValueSuppressionStrategy DEFAULT
Default strategy is SUPPRESS_EMPTY.

Constructor Detail

ValueSuppressionStrategy

public ValueSuppressionStrategy()
Method Detail

suppressAttribute

public abstract boolean suppressAttribute(AttributeDescriptor attributeDescriptor,
                                          java.lang.String value)
Should the given attribute value be suppressed?

Parameters:
attributeDescriptor - AttributeDescriptor describing the attribute, not null
value - Object value, possibly null
Returns:
true if the attribute should not be written for the given value