All Packages Class Hierarchy This Package Previous Next Index
Class ajanta.pattern.PatternCollection
java.lang.Object
|
+----ajanta.pattern.Pattern
|
+----ajanta.pattern.PatternCollection
- public abstract class PatternCollection
- extends Pattern
This is an abstract class which represents aggregation of patterns. It
consists of a list of patterns and its next method can be given different
semantics to derive the pattern such as sequence , set etc.
- See Also:
- Sequence, Set
-
current
- Index to the pattern to be performed next
-
list
- Vector of patterns
-
PatternCollection()
-
-
currentEntry()
-
-
firstEntry()
- It finds the first ItinEntry in the PatternCollection and return it
to the caller.
-
insert(Pattern)
- Add a new pattern to the list of patterns
-
join()
- It calls the join method of the Pattern at current position
-
print()
- It basically prints info about the pattern collection by recursively
calling print method on each of its elements in the list and as well as its
current pointer in the list
-
reset()
- It sets the status of all the patterns in the list to NOTDONE
list
protected Vector list
- Vector of patterns
current
protected int current
- Index to the pattern to be performed next
PatternCollection
public PatternCollection()
reset
protected void reset()
- It sets the status of all the patterns in the list to NOTDONE
- Overrides:
- reset in class Pattern
insert
public void insert(Pattern p)
- Add a new pattern to the list of patterns
- Parameters:
- p - Pattern to be added
join
protected void join()
- It calls the join method of the Pattern at current position
currentEntry
public ItinEntry currentEntry()
- Returns:
- If the status of the PatternCollection is DONE then it returns null
else it returns Pattern at current location
firstEntry
public ItinEntry firstEntry()
- It finds the first ItinEntry in the PatternCollection and return it
to the caller. If the PatternCollection entries are themselves
PatternCollection then it recursively call firstEntry on them
till one finds a instance of ItinEntry.
print
public void print()
- It basically prints info about the pattern collection by recursively
calling print method on each of its elements in the list and as well as its
current pointer in the list
- Overrides:
- print in class Pattern
All Packages Class Hierarchy This Package Previous Next Index