edu.stanford.rt.datatype
Class SetValueSet
java.lang.Object
|
+--edu.stanford.rt.datatype.ValueSet
|
+--edu.stanford.rt.datatype.SetValueSet
- public class SetValueSet
- extends ValueSet
- Author:
- Ninghui Li, Sandra Qiu
A SetValueSet object contains a set of DataValue objects, which are
instances of IntegerValue, DecimalValue, StringValue, EnumValue,
or PrincipalValue. All members have the same type.
Field Summary |
private java.util.HashSet |
values
|
Fields inherited from class edu.stanford.rt.datatype.ValueSet |
|
Method Summary |
void |
addValue(DataValue value)
Add a data value to this set. |
java.util.Set |
getValues()
Returns an unmodifiable view of the values. |
java.lang.String |
toString(java.lang.String indent)
Method toString. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
values
private java.util.HashSet values
SetValueSet
public SetValueSet(SimpleType type)
- Constructor for an empty SetValueSet object.
SetValueSet
public SetValueSet(SimpleType type,
java.util.HashSet values)
throws DomainSpecException
- Constructor for SetValueSet.
addValue
public void addValue(DataValue value)
throws DomainSpecException
- Add a data value to this set.
Exception is thrown if the given value is not an instance of
IntegerValue, DecimalValue, StringValue, EnumValue, or PrincipalValue.
DomainSpecException
getValues
public java.util.Set getValues()
- Returns an unmodifiable view of the values.
toString
public java.lang.String toString(java.lang.String indent)
- Description copied from class:
ValueSet
- Method toString.
- Overrides:
toString
in class ValueSet
- Parameters:
indent
-
- Returns:
- String