|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpal.misc.SimpleIdGroup
public class SimpleIdGroup
Default implementation of IdGroup interface. Memory-inefficient to allow fast whichIdNumber calls.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface pal.misc.IdGroup |
|---|
IdGroup.Utils |
| Constructor Summary | |
|---|---|
SimpleIdGroup(Identifier[] id)
Constructor taking an array of identifiers. |
|
SimpleIdGroup(IdGroup a)
Impersonating Constructor. |
|
SimpleIdGroup(IdGroup a,
IdGroup b)
Constructor taking two separate id groups and merging them. |
|
SimpleIdGroup(IdGroup a,
int toIgnore)
Impersonating Constructor. |
|
SimpleIdGroup(int size)
Constructor taking the size of the group. |
|
SimpleIdGroup(int size,
boolean createIDs)
Constructor taking the size of the group. |
|
SimpleIdGroup(java.lang.String[] labels)
Constructor taking an array of strings. |
|
| Method Summary | |
|---|---|
int |
getIdCount()
Returns the number of identifiers in this group |
Identifier |
getIdentifier(int i)
Returns the ith identifier. |
java.lang.String |
getName()
Return the name of this IdGroup. |
java.lang.String |
getName(int i)
Convenience method to return the name of identifier i |
void |
setIdentifier(int i,
Identifier id)
Sets the ith identifier. |
void |
setName(java.lang.String n)
Sets the name of this IdGroup. |
java.lang.String |
toString()
Returns a string representation of this IdGroup in the form of a bracketed list. |
int |
whichIdNumber(java.lang.String name)
Return index of identifier with name or -1 if not found |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleIdGroup(int size)
public SimpleIdGroup(java.lang.String[] labels)
public SimpleIdGroup(int size,
boolean createIDs)
size - - the number of idscreateIDs - - if true creates default Identifiers.
Otherwise leaves blank (for user to fill in)public SimpleIdGroup(Identifier[] id)
public SimpleIdGroup(IdGroup a,
IdGroup b)
public SimpleIdGroup(IdGroup a)
public SimpleIdGroup(IdGroup a,
int toIgnore)
toIgnore - - will ignore the identifier at the index specified by toIgnore| Method Detail |
|---|
public int getIdCount()
getIdCount in interface IdGrouppublic Identifier getIdentifier(int i)
getIdentifier in interface IdGrouppublic final java.lang.String getName(int i)
public void setIdentifier(int i,
Identifier id)
setIdentifier in interface IdGrouppublic int whichIdNumber(java.lang.String name)
whichIdNumber in interface IdGrouppublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
getName in interface Nameablepublic void setName(java.lang.String n)
setName in interface Nameablen - the new name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||