wt.eff
Interface EffGroupRangeDelegate

All Known Implementing Classes:
DateEffGroupRangeDelegate, LeftFilledStringEffGroupRangeDelegate, StringEffGroupRangeDelegate

public interface EffGroupRangeDelegate

Delegate used by the EffGroupAssistant to convert between an EffRange and start/end pairs. It only requires delegates to define isLessThan(wt.eff.EffRange, wt.eff.EffRange), implementing the delegate is easier, but the logic to do other comparisons is much harder.

Supported API: true

Extendable: true


Method Summary
 boolean isAdjacentTo(EffRange effRangeThis, EffRange effRangeTest)
          Compares two EffRanges to determine if the range represented by this is exactly one unit less than the other.
 boolean isLessThan(EffRange effRangeThis, EffRange effRangeTest)
          Compares two EffRanges to determine if the range represented by this is less than the other.
 EffRange pairToRange(Class effRange, String start, String end)
          Converts a start/end string pair to an EffRange.
 String[] rangeToPair(EffRange effRange)
          Converts an EffRange to start/end pair.
 

Method Detail

pairToRange

public EffRange pairToRange(Class effRange,
                            String start,
                            String end)
                     throws WTPropertyVetoException
Converts a start/end string pair to an EffRange. Validates that the start value is less than or equal to the end value.

Supported API: true

Parameters:
effRange -
start -
end -
Returns:
EffRange
Throws:
WTPropertyVetoException

rangeToPair

public String[] rangeToPair(EffRange effRange)
Converts an EffRange to start/end pair.

Supported API: true

Parameters:
effRange -
Returns:
String[]

isLessThan

public boolean isLessThan(EffRange effRangeThis,
                          EffRange effRangeTest)
Compares two EffRanges to determine if the range represented by this is less than the other. Only the start values are used in the comparison. To compare end values, create ranges that use them as start values.

Supported API: true

Parameters:
effRangeThis -
effRangeTest -
Returns:
boolean

isAdjacentTo

public boolean isAdjacentTo(EffRange effRangeThis,
                            EffRange effRangeTest)
Compares two EffRanges to determine if the range represented by this is exactly one unit less than the other. This comparison applies only to range types that are countable (such as dates); otherwise, this method must return false. Only the start values are used in the comparison. To compare end values, create ranges that use them as start values.

Supported API: true

Parameters:
effRangeThis -
effRangeTest -
Returns:
boolean