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 boolean
add(Right right)
boolean
addAll(Collection<? extends Right> rights)
void
clear()
RightSet
clone()
boolean
contains(Object o)
boolean
containsAll(Collection<?> objects)
boolean
equals(Object o)
int
hashCode()
boolean
isEmpty()
Iterator<Right>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> objects)
boolean
retainAll(Collection<?> objects)
int
size()
Object[]
toArray()
<T> T[]
toArray(T[] ts)
String
toString()
-
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 ofRight
object 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:
equals
in interfaceCollection<Right>
- Specified by:
equals
in interfaceSet<Right>
- Overrides:
equals
in classAbstractSet<Right>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<Right>
- Specified by:
hashCode
in interfaceSet<Right>
- Overrides:
hashCode
in classAbstractSet<Right>
-
removeAll
public boolean removeAll(Collection<?> objects)
- Specified by:
removeAll
in interfaceCollection<Right>
- Specified by:
removeAll
in interfaceSet<Right>
- Overrides:
removeAll
in classAbstractSet<Right>
-
add
public boolean add(Right right)
- Specified by:
add
in interfaceCollection<Right>
- Specified by:
add
in interfaceSet<Right>
- Overrides:
add
in classAbstractCollection<Right>
-
addAll
public boolean addAll(Collection<? extends Right> rights)
- Specified by:
addAll
in interfaceCollection<Right>
- Specified by:
addAll
in interfaceSet<Right>
- Overrides:
addAll
in classAbstractCollection<Right>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<Right>
- Specified by:
clear
in interfaceSet<Right>
- Overrides:
clear
in classAbstractCollection<Right>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<Right>
- Specified by:
contains
in interfaceSet<Right>
- Overrides:
contains
in classAbstractCollection<Right>
-
containsAll
public boolean containsAll(Collection<?> objects)
- Specified by:
containsAll
in interfaceCollection<Right>
- Specified by:
containsAll
in interfaceSet<Right>
- Overrides:
containsAll
in classAbstractCollection<Right>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<Right>
- Specified by:
remove
in interfaceSet<Right>
- Overrides:
remove
in classAbstractCollection<Right>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<Right>
- Specified by:
isEmpty
in interfaceSet<Right>
- Overrides:
isEmpty
in classAbstractCollection<Right>
-
retainAll
public boolean retainAll(Collection<?> objects)
- Specified by:
retainAll
in interfaceCollection<Right>
- Specified by:
retainAll
in interfaceSet<Right>
- Overrides:
retainAll
in classAbstractCollection<Right>
-
size
public int size()
- Specified by:
size
in interfaceCollection<Right>
- Specified by:
size
in interfaceSet<Right>
- Specified by:
size
in classAbstractCollection<Right>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<Right>
- Specified by:
toArray
in interfaceSet<Right>
- Overrides:
toArray
in classAbstractCollection<Right>
-
toArray
public <T> T[] toArray(T[] ts)
- Specified by:
toArray
in interfaceCollection<Right>
- Specified by:
toArray
in interfaceSet<Right>
- Overrides:
toArray
in classAbstractCollection<Right>
-
toString
public String toString()
- Overrides:
toString
in classAbstractCollection<Right>
-
clone
public RightSet clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-