Class TLcdGXYAsynchronousPaintHint.Choice

java.lang.Object
com.luciad.view.gxy.asynchronous.manager.TLcdGXYAsynchronousPaintHint.Choice
All Implemented Interfaces:
TLcdGXYAsynchronousPaintHint.Combinable
Enclosing class:
TLcdGXYAsynchronousPaintHint

public static class TLcdGXYAsynchronousPaintHint.Choice extends Object implements TLcdGXYAsynchronousPaintHint.Combinable

Holder object for a property which can have a discrete set of values.

  • Constructor Details

    • Choice

      public Choice(Set<?> aPossibleValues)

      Create a new property which may have a series of values. Those values will determine whether it is possible to combine two Choice instances into a new Choice.

      When aPossibleValues is empty, this instance will not be able to combine with any other Choice instance.

      Parameters:
      aPossibleValues - A List of possible values for this property. If empty this Choice instance will be unable to combine with any other Choice instance.
    • Choice

      public Choice(Object... aPossibleValues)

      Create a new property which may have a series of values. Those values will determine whether it is possible to combine two Choice instances into a new Choice instance.

      When aPossibleValues is empty, this instance will not be able to combine with any other Choice instance.

      Parameters:
      aPossibleValues - The possible values for this property. If empty this Choice instance will be unable to combine with any other Choice instance.
  • Method Details

    • getPossibleValues

      public Set<Object> getPossibleValues()

      Returns an unmodifiable Set of possible values for this property.

      Returns:
      an unmodifiable List of possible values for this property. Can be empty.
    • combine

      Combine this property with another Combinable instance.

      If for example a Combinable specifies the maximal refresh interval of an ILcdGXYLayer, and for two instances these intervals are 20ms and 30 ms respectively, the combine method could return a Combinable which specifies a maximal refresh interval of 20ms. This way, the timings of both Combinables are respected.

      The result of this method should be independent of the order of this and aOtherProperty, e.g. A.combine(B) should return an Combinable instance which is equivalent to the Combinable instance returned by calling B.combine(A).

      Combining a Choice with another Combinable instance can only return a non-null Combinable instance if the Combinable is an instance of Choice as well. In such case, the returned Combinable instance will be a Choice instance which only contains the choices both properties had in common. When no common properties exists, null will be returned.

      Specified by:
      combine in interface TLcdGXYAsynchronousPaintHint.Combinable
      Parameters:
      aOtherProperty - The other Combinable instance
      Returns:
      The combined instance, or null when both instances were not combinable with each other.
    • toString

      public String toString()
      Overrides:
      toString in class Object