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

Variable Index

 o current
Index to the pattern to be performed next
 o list
Vector of patterns

Constructor Index

 o PatternCollection()

Method Index

 o currentEntry()
 o firstEntry()
It finds the first ItinEntry in the PatternCollection and return it to the caller.
 o insert(Pattern)
Add a new pattern to the list of patterns
 o join()
It calls the join method of the Pattern at current position
 o 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
 o reset()
It sets the status of all the patterns in the list to NOTDONE

Variables

 o list
 protected Vector list
Vector of patterns

 o current
 protected int current
Index to the pattern to be performed next

Constructors

 o PatternCollection
 public PatternCollection()

Methods

 o reset
 protected void reset()
It sets the status of all the patterns in the list to NOTDONE

Overrides:
reset in class Pattern
 o insert
 public void insert(Pattern p)
Add a new pattern to the list of patterns

Parameters:
p - Pattern to be added
 o join
 protected void join()
It calls the join method of the Pattern at current position

 o currentEntry
 public ItinEntry currentEntry()
Returns:
If the status of the PatternCollection is DONE then it returns null else it returns Pattern at current location
 o 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.

 o 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