|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.jstacs.results.Result de.jstacs.results.SimpleResult
public abstract class SimpleResult
Abstract class for a Result
with a value of a primitive data type or
String
.
Result
Field Summary | |
---|---|
protected Comparable |
result
The result. |
Fields inherited from class de.jstacs.results.Result |
---|
comment, datatype, name |
Constructor Summary | |
---|---|
protected |
SimpleResult(StringBuffer rep)
This is the constructor for Storable . |
protected |
SimpleResult(String name,
String comment,
DataType datatype)
The main constructor which takes the main information of a result. |
Method Summary | |
---|---|
int |
compareTo(SimpleResult r)
|
boolean |
equals(Object arg)
|
protected void |
fromXML(StringBuffer representation)
This method is used in Result.Result(StringBuffer) to extract the
information. |
Comparable |
getResult()
Returns the value of the Result . |
String |
toString()
|
StringBuffer |
toXML()
This method returns an XML representation as StringBuffer of an
instance of the implementing class. |
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 |
Field Detail |
---|
protected Comparable result
Constructor Detail |
---|
protected SimpleResult(String name, String comment, DataType datatype)
name
- the name of the resultcomment
- the comment for the resultdatatype
- the data type of the resultprotected SimpleResult(StringBuffer rep) throws NonParsableException
Storable
. Creates a new
SimpleResult
out of the XML representation as returned by
toXML()
.
rep
- the XML representation as StringBuffer
NonParsableException
- if the representation could not be parsed.Method Detail |
---|
public StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.
toXML
in interface Storable
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 Result
representation
- the XML represenation of the Result
to be parsed
NonParsableException
- if the XML representation is not parsableResult.extractMainInfo(StringBuffer)
public Comparable getResult()
Result
Result
.
getResult
in class Result
Result
public String toString()
toString
in class Object
public int compareTo(SimpleResult r)
compareTo
in interface Comparable<SimpleResult>
public boolean equals(Object arg)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |