org.grinvin.invariants

Class Invariant

Implemented Interfaces:
InvariantNode

public abstract class Invariant
extends java.lang.Object
implements InvariantNode

Represents the mathematical concept of graph invariant, like 'diameter', 'average degree', 'largest eigenvalue'... Is uniquely identified by an identifier string. Mapping between identifier strings and invariant instances is done by the invariant manager.
See Also:
InvariantManager

Method Summary

void
accept(Visitor visitor)
boolean
equals(Object obj)
Two invariants are equal if and only if their identifiers are the same.
Iterable
getChildren()
Returns null.
abstract String
getId()
Universally unique identifier for this invariant.
abstract String
getName()
Returns the localized name of the invariant.
abstract Class
getType()
Returns the class to which all values of this invariant belong.
int
hashCode()
The hash value of an invariant is the hash value of its identifier.
abstract String
toString()
Return the localized name of the invariant.

Method Details

accept

public void accept(Visitor visitor)

equals

public boolean equals(Object obj)
Two invariants are equal if and only if their identifiers are the same.

getChildren

public Iterable getChildren()
Returns null. An invariant cannot have other invariant nodes as children.
Specified by:
getChildren in interface InvariantNode

getId

public abstract String getId()
Universally unique identifier for this invariant.

getName

public abstract String getName()
Returns the localized name of the invariant.
Specified by:
getName in interface InvariantNode

getType

public abstract Class getType()

hashCode

public int hashCode()
The hash value of an invariant is the hash value of its identifier.

toString

public abstract String toString()
Return the localized name of the invariant.