|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.topcoder.shared.problem.BaseElement
|
+--com.topcoder.shared.problem.Constraint
|
+--com.topcoder.shared.problem.ValidValuesConstraint
The ValidValuesConstraint is a constraint containing information
as to the valid values of a parameter. This class is not currently in use but
reserved for future use.
| Field Summary | |
protected int |
dimension
The name of the dimension this constraint refers to. |
protected java.lang.String |
paramName
The name of the parameter. |
protected java.util.ArrayList |
validValues
An ArrayList where each element is an instance of Value or Range, and the valid elements are those elements in any one of the Ranges or Values. |
| Constructor Summary | |
ValidValuesConstraint()
Empty constructor required by custom serialization. |
|
ValidValuesConstraint(java.util.ArrayList validValues,
int dimension,
java.lang.String paramName)
|
|
| Method Summary | |
void |
customReadObject(com.topcoder.shared.netCommon.CSReader reader)
Custom serialization |
void |
customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
Custom serialization |
int |
getDimension()
Returns the dimension this constraint refers to. |
java.lang.String |
getParamName()
Returns the parameter name. |
java.util.ArrayList |
getValidValues()
Returns an ArrayList where each element is an instance of Value or Range, and the valid elements are those elements in any one of the Ranges or Values. |
java.lang.String |
toXML()
Returns the constraint as XML. |
| Methods inherited from class com.topcoder.shared.problem.Constraint |
encodeHTML, getRenderer, setRenderer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.topcoder.shared.problem.Element |
getRenderer, setRenderer |
| Field Detail |
protected java.util.ArrayList validValues
protected java.lang.String paramName
protected int dimension
| Constructor Detail |
public ValidValuesConstraint(java.util.ArrayList validValues,
int dimension,
java.lang.String paramName)
validValues - An ArrayList where each element is an instance of
Value or Range, and the valid
elements are those elements in any one
of the Ranges or Values.paramName - The name of the parameter.dimension - The dimension this constraint refers to.public ValidValuesConstraint()
| Method Detail |
public java.util.ArrayList getValidValues()
Value,
Rangepublic int getDimension()
public java.lang.String getParamName()
public void customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
throws java.io.IOException
customWriteObject in interface ElementcustomWriteObject in class Constraintwriter - the writer to write to.
java.io.IOException - if an I/O error has occurred in the stream that backs the writer.
public void customReadObject(com.topcoder.shared.netCommon.CSReader reader)
throws java.io.IOException,
java.io.ObjectStreamException
customReadObject in interface ElementcustomReadObject in class Constraintreader - the reader to read from.
java.io.ObjectStreamException - if the information that is read is inconsistent (stream corrupted
or incompatibility between writers and readers)
java.io.IOException - if an I/O error has occurred in the stream that backs the reader.public java.lang.String toXML()
<valid-values>XML of each value</valid-values>.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||