|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.results.Result
de.jstacs.results.SimpleResult
de.jstacs.results.CategoricalResult
public class CategoricalResult
A class for categorical results (i.e. non-numerical results) for primitives and Strings
Field Summary |
---|
Fields inherited from class de.jstacs.results.SimpleResult |
---|
result |
Fields inherited from class de.jstacs.results.Result |
---|
comment, datatype, name |
Constructor Summary | |
---|---|
CategoricalResult(DataType datatype,
String name,
String comment,
Comparable result)
Creates a result of a primitive categorical datatype or a String |
|
CategoricalResult(StringBuffer representation)
Creates a new CategoricalResult from its XML-representation. |
|
CategoricalResult(String name,
String comment,
boolean result)
Creates a result of a boolean . |
|
CategoricalResult(String name,
String comment,
String result)
Creates a result of a String . |
Method Summary | |
---|---|
protected void |
fromXML(StringBuffer representation)
This method is used in Result.Result(StringBuffer) to extract the information. |
StringBuffer |
toXML()
This method returns an XML-representation of an instance of the implementing class. |
Methods inherited from class de.jstacs.results.SimpleResult |
---|
compareTo, equals, getResult, toString |
Methods inherited from class de.jstacs.results.Result |
---|
appendMainInfo, checkDatatype, createResult, extractMainInfo, getComment, getDatatype, getName, isCastableResult, isComparableResult |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CategoricalResult(StringBuffer representation) throws NonParsableException
CategoricalResult
from its XML-representation.
representation
- the XML-representation
NonParsableException
- a NonParsableException
is thrown if representation
could not be parsedpublic CategoricalResult(DataType datatype, String name, String comment, Comparable result) throws SimpleParameter.IllegalValueException
String
datatype
- the datatypename
- the name of the resultcomment
- a comment on the resultresult
- the result itself
SimpleParameter.IllegalValueException
- if the result value is not of the expected datatype an IllegalValueException
is thrownpublic CategoricalResult(String name, String comment, String result)
String
.
name
- the name of the resultcomment
- a comment on the resultresult
- the result itselfpublic CategoricalResult(String name, String comment, boolean result)
boolean
.
name
- the name of the resultcomment
- a comment on the resultresult
- the result itselfMethod Detail |
---|
public StringBuffer toXML()
Storable
toXML
in interface Storable
toXML
in class SimpleResult
protected void fromXML(StringBuffer representation) throws NonParsableException
Result
Result.Result(StringBuffer)
to extract the information.
The method can be seen as opposite of Storable.toXML()
and should not be made public.
fromXML
in class SimpleResult
representation
- a xml represenation
NonParsableException
- if the xml representation is not parsableResult.extractMainInfo(StringBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |