|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.IndexSet
public class IndexSet
IndexSet is a collection of Indexes in which each column must have a unique name. The collection maintains the order in which the elements are added. The implementation guarantees constant time getting of Indexes by name or ordinal.
Field Summary | |
---|---|
protected java.util.List<Index> |
list
|
protected java.util.Map<java.lang.String,Index> |
map
|
protected Table |
table
|
Constructor Summary | |
---|---|
IndexSet(Table table)
Constructor. |
Method Summary | |
---|---|
Index |
add(Index ix)
Adds an Index to the set. |
boolean |
contains(Index ix)
Tests whether the given Index is in the set. |
boolean |
contains(java.lang.String name)
Tests whether the set contains an Index by the given name |
Index |
get(int index)
Gets the Index at the given index in the set. |
Index |
get(java.lang.String name)
Gets an Index from the set by the Index's name |
boolean |
isEmpty()
Gets whether or not the set has no elements |
java.util.Iterator<Index> |
iterator()
Gets an Iterator over the Indexes in the set. |
int |
size()
Gets the number of Indexes in the set. |
Table |
table()
Gets the Table being indexed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Table table
protected final java.util.Map<java.lang.String,Index> map
protected final java.util.List<Index> list
Constructor Detail |
---|
public IndexSet(Table table)
table
- the Table being indexedIndexSet
Method Detail |
---|
public Index add(Index ix)
ix
- the Index to add
public Table table()
public Index get(int index)
index
- the index of the Index to retrieve
public Index get(java.lang.String name)
name
- the name of the Index to get
public boolean contains(java.lang.String name)
name
- the name of the Index to test for
public boolean contains(Index ix)
ix
- the Index to test for
public java.util.Iterator<Index> iterator()
iterator
in interface java.lang.Iterable<Index>
public boolean isEmpty()
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |