| java.lang.Object net.sourceforge.chaperon.build.ItemSetCollection
ItemSetCollection | public class ItemSetCollection (Code) | | This class contains a collection of item sets.
author: Stephan Michels version: CVS $Id: ItemSetCollection.java,v 1.15 2003/12/09 19:55:52 benedikta Exp $ |
Method Summary | |
public int | addItemSet(ItemSet itemset) Add a itemset to this collection.
Parameters: itemset - Itemset. | public boolean | contains(ItemSet itemset) If this collection contains the item set.
Parameters: itemset - Itemset, which should be found. | public boolean | containsCore(ItemSet itemset) If this collection contains the item set. | public ItemSet | getItemSet(int index) Return an item set given by an index.
Parameters: index - Index of the itemset. | public int | getItemSetCount() | public int | indexOf(ItemSet itemset) Return the index of an item set. | public int | indexOfCore(ItemSet itemset) Return the index of an item set. | public String | toString() Return a string representation of the collection. |
ItemSetCollection | public ItemSetCollection(Grammar grammar, FirstSetCollection firstsets)(Code) | | Create a new collection of item sets, calculated with the aid of the grammar. The constructor
calculates all state and transitions and combine all itemsets with the same core.
Parameters: grammar - Grammar. Parameters: firstsets - First sets. |
ItemSetCollection | public ItemSetCollection(Grammar grammar, FirstSetCollection firstsets, Log log)(Code) | | Create a new collection of item sets, calculated with the aid of the grammar. The constructor
calculates all state and transitions and combine all itemsets with the same core.
Parameters: grammar - Grammar Parameters: firstsets - First sets. Parameters: log - Log, which should be used. |
addItemSet | public int addItemSet(ItemSet itemset)(Code) | | Add a itemset to this collection.
Parameters: itemset - Itemset. Index of the itemset in the collection. |
contains | public boolean contains(ItemSet itemset)(Code) | | If this collection contains the item set.
Parameters: itemset - Itemset, which should be found. True, if the collection contains the itemset. |
containsCore | public boolean containsCore(ItemSet itemset)(Code) | | If this collection contains the item set. This method compares only the core of the itemset.
Parameters: itemset - Itemset, which should be found. True, if the collection contain the itemset. |
getItemSet | public ItemSet getItemSet(int index)(Code) | | Return an item set given by an index.
Parameters: index - Index of the itemset. Itemset. |
getItemSetCount | public int getItemSetCount()(Code) | | Return the count of item sets in this collection
Count of itemsets. |
indexOf | public int indexOf(ItemSet itemset)(Code) | | Return the index of an item set. If the collection does not contain the itemset, then return
this method will return -1.
Parameters: itemset - Itemset, which should be found. Index of the itemset. |
indexOfCore | public int indexOfCore(ItemSet itemset)(Code) | | Return the index of an item set. If the collection does not contain the itemset, then this
method will return -1. This Method compare only the core from the item sets.
Parameters: itemset - Itemset, which should be found. Index of the Itemset |
toString | public String toString()(Code) | | Return a string representation of the collection.
String representation of the collection. |
|
|