Package org.xwiki.security.authorization
Class RightSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<Right>
-
- org.xwiki.security.authorization.RightSet
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Right>,Collection<Right>,Set<Right>
public class RightSet extends AbstractSet<Right> implements Cloneable, Serializable
Optimized set ofRight.- Since:
- 4.0M2
- Version:
- $Id: 54d4e62cc0742a69f09dac73c1859f31d7572a43 $
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Right right)booleanaddAll(Collection<? extends Right> rights)voidclear()RightSetclone()booleancontains(Object o)booleancontainsAll(Collection<?> objects)booleanequals(Object o)inthashCode()booleanisEmpty()Iterator<Right>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> objects)booleanretainAll(Collection<?> objects)intsize()Object[]toArray()<T> T[]toArray(T[] ts)StringtoString()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
RightSet
public RightSet()
Default constructor.
-
RightSet
public RightSet(Collection<? extends Right> rights)
Create a new initialized set.- Parameters:
rights- a collection ofRightobject to initialize the set
-
RightSet
public RightSet(Right... rights)
Create a new initialized set.- Parameters:
rights- the rights you want in the set
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceCollection<Right>- Specified by:
equalsin interfaceSet<Right>- Overrides:
equalsin classAbstractSet<Right>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Right>- Specified by:
hashCodein interfaceSet<Right>- Overrides:
hashCodein classAbstractSet<Right>
-
removeAll
public boolean removeAll(Collection<?> objects)
- Specified by:
removeAllin interfaceCollection<Right>- Specified by:
removeAllin interfaceSet<Right>- Overrides:
removeAllin classAbstractSet<Right>
-
add
public boolean add(Right right)
- Specified by:
addin interfaceCollection<Right>- Specified by:
addin interfaceSet<Right>- Overrides:
addin classAbstractCollection<Right>
-
addAll
public boolean addAll(Collection<? extends Right> rights)
- Specified by:
addAllin interfaceCollection<Right>- Specified by:
addAllin interfaceSet<Right>- Overrides:
addAllin classAbstractCollection<Right>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Right>- Specified by:
clearin interfaceSet<Right>- Overrides:
clearin classAbstractCollection<Right>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Right>- Specified by:
containsin interfaceSet<Right>- Overrides:
containsin classAbstractCollection<Right>
-
containsAll
public boolean containsAll(Collection<?> objects)
- Specified by:
containsAllin interfaceCollection<Right>- Specified by:
containsAllin interfaceSet<Right>- Overrides:
containsAllin classAbstractCollection<Right>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Right>- Specified by:
removein interfaceSet<Right>- Overrides:
removein classAbstractCollection<Right>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Right>- Specified by:
isEmptyin interfaceSet<Right>- Overrides:
isEmptyin classAbstractCollection<Right>
-
retainAll
public boolean retainAll(Collection<?> objects)
- Specified by:
retainAllin interfaceCollection<Right>- Specified by:
retainAllin interfaceSet<Right>- Overrides:
retainAllin classAbstractCollection<Right>
-
size
public int size()
- Specified by:
sizein interfaceCollection<Right>- Specified by:
sizein interfaceSet<Right>- Specified by:
sizein classAbstractCollection<Right>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Right>- Specified by:
toArrayin interfaceSet<Right>- Overrides:
toArrayin classAbstractCollection<Right>
-
toArray
public <T> T[] toArray(T[] ts)
- Specified by:
toArrayin interfaceCollection<Right>- Specified by:
toArrayin interfaceSet<Right>- Overrides:
toArrayin classAbstractCollection<Right>
-
toString
public String toString()
- Overrides:
toStringin classAbstractCollection<Right>
-
clone
public RightSet clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-