|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.ColumnSet
public class ColumnSet
ColumnSet is a collection of Columns in which each column must have a unique name. The collection maintains the order in which the Columns are added. The implementation guarantees constant time getting of Columns by name or ordinal.
Column
Field Summary | |
---|---|
protected java.util.List<Column> |
list
|
protected java.util.Map<java.lang.String,Column> |
map
|
Constructor Summary | |
---|---|
ColumnSet()
Constructor. |
Method Summary | |
---|---|
Column |
add(Column col)
Add a Column to the set. |
boolean |
contains(Column col)
Tests to see if a Column is already in the set. |
boolean |
contains(java.lang.String name)
Tests to see if a Column exists in the set by a particular name. |
Column |
get(int index)
Gets a Column from the set by the ordinal. |
Column |
get(java.lang.String name)
Gets a Column from the set by the Column name. |
boolean |
isEmpty()
Is the set empty? |
java.util.Iterator<Column> |
iterator()
Gets an iterator. |
int |
size()
Gets the number of Columns in the set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.Map<java.lang.String,Column> map
protected final java.util.List<Column> list
Constructor Detail |
---|
public ColumnSet()
Method Detail |
---|
public Column add(Column col)
col
- The Column to add to the set.
Column
public Column get(int index)
index
- The ordinal.
Column
public Column get(java.lang.String name)
name
- The name of the Column to retrieve.
Column
public boolean contains(java.lang.String name)
name
- The name of the Column.
Column
public boolean contains(Column col)
col
- The Column.
Column
public java.util.Iterator<Column> iterator()
iterator
in interface java.lang.Iterable<Column>
Iterator
public boolean isEmpty()
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |