|
||||||||||
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
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 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 datatype of the resultprotected SimpleResult(StringBuffer rep) throws NonParsableException
Storable
.
rep
- the xml representation
NonParsableException
- if the representation could not be parsed.Method Detail |
---|
public StringBuffer toXML()
Storable
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
- a xml represenation
NonParsableException
- if the xml representation is not parsableResult.extractMainInfo(StringBuffer)
public Comparable getResult()
Result
getResult
in class 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 |