edu.washington.cs.supple.rep
Class StringTypeImpl
java.lang.Object
edu.washington.cs.supple.rep.SuppleBeanImpl
edu.washington.cs.supple.rep.BaseType
edu.washington.cs.supple.rep.SimpleValueTypeImpl
edu.washington.cs.supple.rep.StringTypeImpl
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, SimpleValueType, StringType, SuppleBean, SuppleType, ValueListener
- Direct Known Subclasses:
- FileType
- public class StringTypeImpl
- extends SimpleValueTypeImpl
- implements StringType
- Author:
- kgajos
- See Also:
- Serialized Form
| Fields inherited from class edu.washington.cs.supple.rep.BaseType |
finalLegalValues, hasOrdering, lastUid, legalValues, legalValuesBinding, likelyValues, likelyValuesBinding, maxNumLegalValues, nullLegal, typicalIndexLength, uid |
| 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, getUniqueId, hashCode, hasOrdering, hasSetLegalValues, isFinalLegalValues, isLegalValue, setFinalLegalValues, setLegalValues, setLikelyValues, setMaxNumLegalValues, setTypicalIndexLength, toPrettyString, valueChanged, verifyCurrentValue, visitBoundProperties |
| 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, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getUniqueId, hasIndex, hasOrdering, hasSetLegalValues, isFinalLegalValues, isLegalValue, isPrimitiveType, toPrettyString, verifyCurrentValue |
typicalValueLength
protected int typicalValueLength
StringTypeImpl
public StringTypeImpl()
StringTypeImpl
public StringTypeImpl(java.util.Collection likelyValues)
StringTypeImpl
public StringTypeImpl(java.util.Collection likelyValues,
java.util.Collection legalValues)
StringTypeImpl
public StringTypeImpl(java.util.Collection likelyValues,
java.util.Collection legalValues,
boolean finalDomain)
StringTypeImpl
public StringTypeImpl(java.lang.Object[] likelyValues,
java.lang.Object[] legalValues,
boolean finalDomain)
StringTypeImpl
public StringTypeImpl(java.lang.Object[] likelyValues,
java.lang.Object[] legalValues)
StringTypeImpl
public StringTypeImpl(ValueBinding likelyVals,
ValueBinding legalVals)
isEnumerable
public boolean isEnumerable()
- String type is enumerable if the set of allowed values has
been set
- Specified by:
isEnumerable in interface SuppleType- Specified by:
isEnumerable in class BaseType
enableAlphabeticalOrdering
public void enableAlphabeticalOrdering(boolean b)
- If set to true, the legal and likely values will be kept in
alphabetical order; by default this is set to false
- Specified by:
enableAlphabeticalOrdering in interface StringType
- Parameters:
b -
orderValues
public java.util.Vector orderValues(java.util.Vector v)
- Description copied from interface:
SuppleType
- This method enforces type-specific ordering on values (can only be
legally invoked if hasOrdering() returns true)
- Specified by:
orderValues in interface SuppleType- Overrides:
orderValues in class BaseType
- Parameters:
v - values to be ordered
- Returns:
- ordered vector of values
getTypicalValueLength
public int getTypicalValueLength()
- Specified by:
getTypicalValueLength in interface StringType
- Returns:
- the expected lenght (in characters) of usual inputs
getTypicalIndexLength
public int getTypicalIndexLength()
- Description copied from interface:
SuppleType
- Returns the typical lenght of the index
- Specified by:
getTypicalIndexLength in interface SuppleType- Overrides:
getTypicalIndexLength in class BaseType
- Returns:
- typical index length (in characters)
setTypicalValueLength
public void setTypicalValueLength(int i)
- Parameters:
i - the expected length (in characters) of usual inputs
isLegalValueType
protected boolean isLegalValueType(java.lang.Object value)
isLegalValueClass
public boolean isLegalValueClass(java.lang.Class c)
- Description copied from interface:
SuppleType
- Check if a class is legal for this type.
- Specified by:
isLegalValueClass in interface SuppleType
- Parameters:
c -
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString in class BaseType