org.grinvin.invariants.values

Class AbstractInvariantValue

Implemented Interfaces:
InvariantValue
Known Direct Subclasses:
BooleanValue, IntegerMatrixValue, ListOfIntegersValue, ListOfRealsValue, NumericValue, UnavailableValue

public abstract class AbstractInvariantValue
extends java.lang.Object
implements InvariantValue

Wraps the result of an invariant computation and provides a means to represent this result both as a string and an XML element.

Constructor Summary

AbstractInvariantValue(InvariantType type)
AbstractInvariantValue(InvariantType type, InvariantComputer computer)
Create a value of the given type which was computed by the given invariant computer.

Method Summary

@Override
String toString()
String
getComputerId()
Return the ID of the computer that computed this value.
String
getComputerVersion()
Return the version of the computer that computed this value.
Invariant
getInvariant()
Return the invariant of which this is a value.
InvariantType
getType()
Return the InvariantType of this value.
abstract String
toText()
Convert this value to a string.

Constructor Details

AbstractInvariantValue

protected AbstractInvariantValue(InvariantType type)

AbstractInvariantValue

protected AbstractInvariantValue(InvariantType type,
                                 InvariantComputer computer)
Create a value of the given type which was computed by the given invariant computer.

Method Details

String toString

public @Override String toString()

getComputerId

public String getComputerId()
Return the ID of the computer that computed this value.
Specified by:
getComputerId in interface InvariantValue

getComputerVersion

public String getComputerVersion()
Return the version of the computer that computed this value.
Specified by:
getComputerVersion in interface InvariantValue

getInvariant

public Invariant getInvariant()
Return the invariant of which this is a value.
Specified by:
getInvariant in interface InvariantValue

getType

public InvariantType getType()
Return the InvariantType of this value.
Specified by:
getType in interface InvariantValue

toText

public abstract String toText()
Convert this value to a string.
Specified by:
toText in interface InvariantValue