|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.IDList
public class IDList
A list of Longs, typically used as database IDs.
Field Summary | |
---|---|
protected java.util.ArrayList |
ids
The IDs in the list, in order. |
Constructor Summary | |
---|---|
IDList()
Create an empty ID list. |
|
IDList(java.util.Collection ids)
Create a list with specified IDs. |
|
IDList(java.lang.Long[] ids)
Create a list with specified IDs. |
Method Summary | |
---|---|
void |
add(java.lang.Long id)
Add an ID to the end of the list. |
void |
clear()
Clears the ids. |
boolean |
equals(java.lang.Object obj)
Returns true if some other id list is equal to this one. |
java.util.ArrayList |
getIDs()
Gets IDs. |
int |
getNumIDs()
Get the number of IDs. |
int |
hashCode()
Returns a hash code for the object. |
java.lang.String |
toString()
Gets a string representation of the phrase. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList ids
Constructor Detail |
---|
public IDList()
public IDList(java.lang.Long[] ids)
ids
- The IDs. public IDList(java.util.Collection ids)
ids
- Collection of IDs. Method Detail |
---|
public void add(java.lang.Long id)
id
- The ID to add to the end of the list. public java.util.ArrayList getIDs()
public int getNumIDs()
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The two lists are equal if their id entries are equal.
equals
in class java.lang.Object
obj
- The other object.
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |