org.grinvin.invariants

Class InvariantGroup

Implemented Interfaces:
InvariantNode

public class InvariantGroup
extends java.lang.Object
implements InvariantNode

Groups a list of invariants, invariant factories or subgroups. The main purpose of an invariant group is to enable a tree-like display of invariants and factories, in a GUI-component or as part of the help system.

Constructor Summary

InvariantGroup(String name, String insertionPoint)
Construct an empty group with the given internationalized name (caption).

Method Summary

void
accept(Visitor visitor)
void
add(InvariantNode child)
Add a child to the group.
Iterable
getChildren()
String
getInsertionPoint()
Return the insertion point identifier for this group, or null if the group does not serve as an insertion point.
String
getName()

Constructor Details

InvariantGroup

public InvariantGroup(String name,
                      String insertionPoint)
Construct an empty group with the given internationalized name (caption). Initially this group has no children.
Parameters:
name - Localized name for this group
insertionPoint - Identifies this group as an insertion point. A value of null indicates that the group does not serve as an insertion point.

Method Details

accept

public void accept(Visitor visitor)

add

public void add(InvariantNode child)
Add a child to the group.

getChildren

public Iterable getChildren()
Specified by:
getChildren in interface InvariantNode

getInsertionPoint

public String getInsertionPoint()
Return the insertion point identifier for this group, or null if the group does not serve as an insertion point.

getName

public String getName()
Specified by:
getName in interface InvariantNode