Package 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

    Modifier and Type
    Method
    Description
    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.
    pairToRange(Class effRange, String start, String end)
    Converts a start/end string pair to an EffRange.
    pairToRange(Class effRange, String start, String end, boolean validate)
    Converts a start/end string pair to an EffRange.
    Converts an EffRange to start/end pair.
  • Method Details

    • pairToRange

      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
    • pairToRange

      EffRange pairToRange(Class effRange, String start, String end, boolean validate) 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 if validate flag is checked.

      Supported API: true
      Parameters:
      effRange -
      start -
      end -
      Returns:
      EffRange
      Throws:
      WTPropertyVetoException
    • rangeToPair

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

      Supported API: true
      Parameters:
      effRange -
      Returns:
      String[]
    • isLessThan

      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

      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