edu.washington.cs.supple.rep
Class SimpleValueTypeImpl

java.lang.Object
  extended byedu.washington.cs.supple.rep.SuppleBeanImpl
      extended byedu.washington.cs.supple.rep.BaseType
          extended byedu.washington.cs.supple.rep.SimpleValueTypeImpl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, SimpleValueType, SuppleBean, SuppleType, ValueListener
Direct Known Subclasses:
BooleanTypeImpl, DateTypeImpl, ImageTypeImpl, IntegerTypeImpl, MapLocationTypeImpl, StringTypeImpl, TextTypeImpl

public abstract class SimpleValueTypeImpl
extends BaseType
implements SimpleValueType

Author:
kgajos This class is a base for all simple type definitions that contain a value (as opposed to container types which are composed of other types).
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.washington.cs.supple.rep.BaseType
finalLegalValues, hasOrdering, lastUid, legalValues, legalValuesBinding, likelyValues, likelyValuesBinding, maxNumLegalValues, nullLegal, typicalIndexLength, uid
 
Fields inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
pcs
 
Constructor Summary
SimpleValueTypeImpl()
           
SimpleValueTypeImpl(java.util.Collection likelyValues)
           
SimpleValueTypeImpl(java.util.Collection likelyValues, java.util.Collection legalValues)
           
SimpleValueTypeImpl(java.lang.Object[] likelyValues, java.lang.Object[] legalValues)
           
SimpleValueTypeImpl(ValueBinding likelyVals, ValueBinding legalVals)
           
 
Method Summary
 java.lang.String getIndex(java.lang.Object value)
           
 boolean hasIndex()
          Index is a short unique summary of the value (which can be used for choosing present values, etc.
 boolean isPrimitiveType()
          Test if this is a primitive type.
 
Methods inherited from class edu.washington.cs.supple.rep.BaseType
accept, addLegalValue, addLegalValueHelper, addLegalValues, addLikelyValue, addLikelyValueHelper, bindLegalValues, bindLikelyValues, ensureLegalValues, equals, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hashCode, hasOrdering, hasSetLegalValues, isEnumerable, isFinalLegalValues, isLegalValue, orderValues, setFinalLegalValues, setLegalValues, setLikelyValues, setMaxNumLegalValues, setTypicalIndexLength, toPrettyString, toString, valueChanged, verifyCurrentValue, visitBoundProperties
 
Methods inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleType
accept, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hasOrdering, hasSetLegalValues, isEnumerable, isFinalLegalValues, isLegalValue, isLegalValueClass, orderValues, toPrettyString, verifyCurrentValue
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

SimpleValueTypeImpl

public SimpleValueTypeImpl()

SimpleValueTypeImpl

public SimpleValueTypeImpl(java.util.Collection likelyValues)

SimpleValueTypeImpl

public SimpleValueTypeImpl(java.util.Collection likelyValues,
                           java.util.Collection legalValues)

SimpleValueTypeImpl

public SimpleValueTypeImpl(java.lang.Object[] likelyValues,
                           java.lang.Object[] legalValues)

SimpleValueTypeImpl

public SimpleValueTypeImpl(ValueBinding likelyVals,
                           ValueBinding legalVals)
Method Detail

hasIndex

public boolean hasIndex()
Description copied from interface: SuppleType
Index is a short unique summary of the value (which can be used for choosing present values, etc.

Specified by:
hasIndex in interface SuppleType
Returns:
true if the type has an index defined, false otherwise

getIndex

public java.lang.String getIndex(java.lang.Object value)
Specified by:
getIndex in interface SuppleType
Returns:
the index of a value (if exists); null otherwise

isPrimitiveType

public boolean isPrimitiveType()
Description copied from interface: SuppleType
Test if this is a primitive type.

Specified by:
isPrimitiveType in interface SuppleType
Returns: