|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.ForeignKeySet
public class ForeignKeySet
ForeignKeySet is a collection of ForeignKeys 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 ForeignKeys by name or ordinal.
ForeignKey
Field Summary | |
---|---|
protected java.util.List<ForeignKey> |
list
|
protected java.util.Map<java.lang.String,ForeignKey> |
map
|
Constructor Summary | |
---|---|
ForeignKeySet()
Constructor. |
Method Summary | |
---|---|
ForeignKey |
add(ForeignKey fk)
Adds a ForeignKey to the set. |
boolean |
contains(ForeignKey fk)
Tests whether the ForeignKey is in the set. |
boolean |
contains(java.lang.String name)
Tests whether a ForeignKey is in the set by name. |
ForeignKey |
get(int index)
Gets a ForeignKey from the set by the ordinal. |
ForeignKey |
get(java.lang.String name)
Gets a ForeignKey from the set by the ForeignKey's name. |
boolean |
isEmpty()
Returns true if the set is empty. |
java.util.Iterator<ForeignKey> |
iterator()
Gets an Iterator over the ForeignKeys in the set |
int |
size()
Gets the number of elements 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,ForeignKey> map
protected final java.util.List<ForeignKey> list
Constructor Detail |
---|
public ForeignKeySet()
Method Detail |
---|
public ForeignKey add(ForeignKey fk)
fk
- The ForeignKey to add to the set.
ForeignKey
public ForeignKey get(int index)
index
- The ordinal.
ForeignKey
public ForeignKey get(java.lang.String name)
name
- The name of the ForeignKey
ForeignKey
public boolean contains(java.lang.String name)
name
- the name of the ForeignKey
public boolean contains(ForeignKey fk)
fk
- The ForeignKey
public java.util.Iterator<ForeignKey> iterator()
iterator
in interface java.lang.Iterable<ForeignKey>
public boolean isEmpty()
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |