| Constructor and Description |
|---|
RhnSetImpl()
Default constructor.
|
RhnSetImpl(java.lang.Long id,
java.lang.String lbl,
SetCleanup cleanup0)
Constructs an RhnSet with the given user id and label.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object e) |
boolean |
addAll(java.util.Collection c) |
void |
addElement(java.lang.Long elem)
Adds an element to the set.
|
void |
addElement(java.lang.Long elem,
java.lang.Long elemTwo)
Adds an element to the set.
|
void |
addElement(java.lang.Long elem,
java.lang.Long elemTwo,
java.lang.Long elemThree)
Add a new element to the Set
|
void |
addElement(RhnSetElement element)
Adds an element to the set.
|
void |
addElement(java.lang.String elem)
Add a new element to the Set.
|
void |
addElements(java.lang.String[] elems)
Adds an array of elements to the set.
|
void |
clear()
Clear the set - remove all elements
|
boolean |
contains(java.lang.Long elem)
Returns whether or not the set contains the given RhnSetElement
given elem (elementTwo is assumed to be null)
|
boolean |
contains(java.lang.Long elem,
java.lang.Long elemTwo)
Returns whether or not the set contains the given RhnSetElement
given elem and elemTwo
|
boolean |
contains(java.lang.Object o) |
boolean |
contains(RhnSetElement e)
Returns whether or not the set contains the given RhnSetElement
|
boolean |
containsAll(java.util.Collection c) |
java.util.Set<RhnSetElement> |
getAdded()
Return a set of all elements that have been added since the last call
to
sync() |
java.util.Set<RhnSetElement> |
getElements()
Returns a java.util.Set of the Elements in the RhnSet.
|
java.util.Set<java.lang.Long> |
getElementValues()
Returns a java.util.Set of the Long values in each RhnSetElement.
|
java.lang.String |
getLabel()
Getter for label
|
java.util.Set<RhnSetElement> |
getRemoved()
Return a set of all elements that have been removed since the last call
to
sync() |
java.lang.Long |
getUserId()
Getter for user id
|
boolean |
isEmpty()
Determine if the set is empty
|
boolean |
isSynced()
Return
true if this set has ever been synced |
java.util.Iterator<RhnSetElement> |
iterator() |
boolean |
remove(java.lang.Long o)
Remove a item from the set.
|
boolean |
remove(java.lang.Object o) |
boolean |
remove(RhnSetElement o)
Remove an rhnSetElement from the set
|
boolean |
removeAll(java.util.Collection c)
removes a collection of RhnSetElemnets from the set
|
void |
removeElement(java.lang.Long elem)
Remove an element from the set
|
void |
removeElement(java.lang.Long elem,
java.lang.Long elemTwo)
Remove an element from the set
|
void |
removeElement(RhnSetElement element)
Remove an element from the set
|
void |
removeElements(java.lang.String[] elems)
Removes an array of elements to the set.
|
boolean |
retainAll(java.util.Collection c)
retains a collection of RhnSetElemnets from the set
|
void |
setLabel(java.lang.String lbl)
Setter for label
|
void |
setUserId(java.lang.Long id)
Setter for user id
|
int |
size()
Returns the size of the element list for the set
|
void |
sync()
Save the current state of the set.
|
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
public RhnSetImpl()
public RhnSetImpl(java.lang.Long id,
java.lang.String lbl,
SetCleanup cleanup0)
id - userid to associate with this RhnSet.lbl - label to associate with this RhnSet.cleanup0 - the cleanup to use after storing this setpublic void setUserId(java.lang.Long id)
public java.lang.Long getUserId()
public void setLabel(java.lang.String lbl)
public java.lang.String getLabel()
public void addElement(RhnSetElement element)
addElement in interface RhnSetelement - Element to be added to the set.public void addElement(java.lang.Long elem,
java.lang.Long elemTwo)
addElement in interface RhnSetelem - Element oneelemTwo - Element twopublic void addElement(java.lang.Long elem,
java.lang.Long elemTwo,
java.lang.Long elemThree)
addElement in interface RhnSetelem - Element one.elemTwo - Element two, can be null.elemThree - Element three, can be null.public void addElement(java.lang.Long elem)
addElement in interface RhnSetelem - Element onepublic void addElement(java.lang.String elem)
addElement in interface RhnSetelem - Element one or Element1|Element2public void addElements(java.lang.String[] elems)
addElements in interface RhnSetelems - String [] - array of elements to addpublic void removeElements(java.lang.String[] elems)
removeElements in interface RhnSetelems - String [] - array of elements to addpublic void removeElement(RhnSetElement element)
removeElement in interface RhnSetelement - Element to removepublic void removeElement(java.lang.Long elem,
java.lang.Long elemTwo)
removeElement in interface RhnSetelem - value for elementelemTwo - value for elementTwopublic void removeElement(java.lang.Long elem)
removeElement in interface RhnSetelem - value for elementpublic void clear()
public java.util.Set<RhnSetElement> getElements()
getElements in interface RhnSetpublic java.util.Set<java.lang.Long> getElementValues()
getElementValues in interface RhnSetpublic boolean contains(RhnSetElement e)
public boolean contains(java.lang.Long elem,
java.lang.Long elemTwo)
public boolean contains(java.lang.Long elem)
public int size()
public boolean isEmpty()
public void sync()
getAdded() and
getRemoved() will report changes with respect to the state
of the set at the last call to this methodpublic boolean isSynced()
true if this set has ever been syncedtrue if this set has ever been syncedpublic java.util.Set<RhnSetElement> getAdded()
sync()sync()public java.util.Set<RhnSetElement> getRemoved()
sync()sync()public boolean add(java.lang.Object e)
add in interface java.util.Collectionadd in interface java.util.Setpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.Setpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Setpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Setpublic java.util.Iterator<RhnSetElement> iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Setpublic boolean remove(java.lang.Long o)
o - the first element of the RhnSetElement to removepublic boolean remove(RhnSetElement o)
o - the elementpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Setpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.Set