GWT 0.0.0

com.google.gwt.core.ext
Class DefaultSelectionProperty

java.lang.Object
  extended by com.google.gwt.core.ext.DefaultSelectionProperty
All Implemented Interfaces:
SelectionProperty

public class DefaultSelectionProperty
extends java.lang.Object
implements SelectionProperty

Default immutable implementation of SelectionProperty that receives its values in its constructor.


Constructor Summary
DefaultSelectionProperty(java.lang.String currentValue, java.lang.String fallbackValue, java.lang.String name, java.util.SortedSet<java.lang.String> possibleValues)
          Construct a selection property.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCurrentValue()
          The value for the permutation currently being considered.
 java.lang.String getFallbackValue()
          Gets the fallback value for the property.
 java.lang.String getName()
          The name of the property.
 java.util.SortedSet<java.lang.String> getPossibleValues()
          Returns the possible values for the property in sorted order.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultSelectionProperty

public DefaultSelectionProperty(java.lang.String currentValue,
                                java.lang.String fallbackValue,
                                java.lang.String name,
                                java.util.SortedSet<java.lang.String> possibleValues)
Construct a selection property.

Parameters:
currentValue - current value of this property, must not be null
fallbackValue - the fallback value to use, must not be null
name - the name of this property, must not be null
possibleValues - the set of possible values, must not be null and will be returned to callers, so a copy should be passed into this ctor if the caller will use this set later
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getCurrentValue

public java.lang.String getCurrentValue()
Description copied from interface: SelectionProperty
The value for the permutation currently being considered.

Specified by:
getCurrentValue in interface SelectionProperty
Returns:
the property value as a String.

getFallbackValue

public java.lang.String getFallbackValue()
Description copied from interface: SelectionProperty
Gets the fallback value for the property.

Specified by:
getFallbackValue in interface SelectionProperty
Returns:
the fallback, or ""

getName

public java.lang.String getName()
Description copied from interface: SelectionProperty
The name of the property.

Specified by:
getName in interface SelectionProperty
Returns:
the property name as a String.

getPossibleValues

public java.util.SortedSet<java.lang.String> getPossibleValues()
Description copied from interface: SelectionProperty
Returns the possible values for the property in sorted order.

Specified by:
getPossibleValues in interface SelectionProperty
Returns:
a SortedSet of Strings containing the possible property values.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

GWT 0.0.0