org.grinvin.invariants
Interface InvariantFactory
- Factory, InvariantNode
public interface InvariantFactory
An object that satisfies this interface can be used to create an invariant.
To have a factory create an invariant, first
set its parameters using
InvariantFactory
and
then call
createInvariant()
.
Invariant | createInvariant() - Creates and returns an invariant for the current parameter values.
|
Iterable | getChildren() - Always should return null.
|
String | getId() - Return the generic identifier of this factory.
|
String | getInvariantId() - Return the id of the invariant which will be created
from this factory when using the current parameter values.
|
String | getName() - Return the localized name for this parametrized invariant.
|
String | toString() - Should return the same string as
getName() .
|
getChildren
public Iterable getChildren()
Always should return null. A factory cannot have other invariant nodes as
children.
- getChildren in interface InvariantNode
getId
public String getId()
Return the generic identifier of this factory. Should be a prefix
of every invariant id generated by this factory.
getInvariantId
public String getInvariantId()
throws FactoryParameterException
Return the id of the invariant which will be created
from this factory when using the current parameter values. Every id
returned by this method has the same structure: it starts with the
generic id, as returned by
getId()
and is followed by a parameter
string, which is structured like a query string of a URI.
getName
public String getName()
Return the localized name for this parametrized invariant.
- getName in interface InvariantNode
toString
public String toString()