org.grinvin.invariants.values

Class IntegerValue

Implemented Interfaces:
InvariantValue

public class IntegerValue
extends NumericValue

Invariant type which allows integral values, positive and negative infinity and undefined values. Identified by the string integer.

Field Summary

Fields inherited from class org.grinvin.invariants.values.NumericValue

value

Constructor Summary

IntegerValue(int value, InvariantComputer computer)
Create an object of this type with the given integral value.

Method Summary

static IntegerValue
negativeInfinity(InvariantComputer computer)
Return an object of this type representing negative infinity.
static IntegerValue
positiveInfinity(InvariantComputer computer)
Return an object of this type representing positive infinity.
String
toText()
Return a String representation of this value.
static String
toText(double value)
static IntegerValue
undefinedValue(InvariantComputer computer)
Return an object of this type representing an undefined value.

Methods inherited from class org.grinvin.invariants.values.NumericValue

asDouble

Methods inherited from class org.grinvin.invariants.values.AbstractInvariantValue

String toString, getComputerId, getComputerVersion, getInvariant, getType, toText

Constructor Details

IntegerValue

public IntegerValue(int value,
                    InvariantComputer computer)
Create an object of this type with the given integral value.

Method Details

negativeInfinity

public static IntegerValue negativeInfinity(InvariantComputer computer)
Return an object of this type representing negative infinity.

positiveInfinity

public static IntegerValue positiveInfinity(InvariantComputer computer)
Return an object of this type representing positive infinity.

toText

public String toText()
Return a String representation of this value.
Specified by:
toText in interface InvariantValue
Overrides:
toText in interface AbstractInvariantValue

toText

public static String toText(double value)

undefinedValue

public static IntegerValue undefinedValue(InvariantComputer computer)
Return an object of this type representing an undefined value.