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()
Return the list of children of this node.
String
getInsertionPoint()
Return the insertion point identifier for this group, or null if the group does not serve as an insertion point.
String
getName()
Return a localized name for this node.

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()
Return the list of children of this node. Returns null for a node which is not supposed to have children. Returns an empty list for nodes that can have children, but currently have none.
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()
Return a localized name for this node.
Specified by:
getName in interface InvariantNode