org.xwiki.security.authorization
Class RightSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<Right>
          extended by 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 of Right.

Since:
4.0M2
Version:
$Id: b2b7e2a8e3c0c9fc879f79db60c83368cd739e15 $
See Also:
Serialized Form

Constructor Summary
RightSet()
          Default constructor.
RightSet(Collection<? extends Right> rights)
          Create a new initialized set.
RightSet(Right... rights)
          Create a new initialized set.
 
Method Summary
 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
 

Constructor Detail

RightSet

public RightSet()
Default constructor.


RightSet

public RightSet(Collection<? extends Right> rights)
Create a new initialized set.

Parameters:
rights - a collection of Right 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

iterator

public Iterator<Right> iterator()
Specified by:
iterator in interface Iterable<Right>
Specified by:
iterator in interface Collection<Right>
Specified by:
iterator in interface Set<Right>
Specified by:
iterator in class AbstractCollection<Right>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<Right>
Specified by:
equals in interface Set<Right>
Overrides:
equals in class AbstractSet<Right>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Right>
Specified by:
hashCode in interface Set<Right>
Overrides:
hashCode in class AbstractSet<Right>

removeAll

public boolean removeAll(Collection<?> objects)
Specified by:
removeAll in interface Collection<Right>
Specified by:
removeAll in interface Set<Right>
Overrides:
removeAll in class AbstractSet<Right>

add

public boolean add(Right right)
Specified by:
add in interface Collection<Right>
Specified by:
add in interface Set<Right>
Overrides:
add in class AbstractCollection<Right>

addAll

public boolean addAll(Collection<? extends Right> rights)
Specified by:
addAll in interface Collection<Right>
Specified by:
addAll in interface Set<Right>
Overrides:
addAll in class AbstractCollection<Right>

clear

public void clear()
Specified by:
clear in interface Collection<Right>
Specified by:
clear in interface Set<Right>
Overrides:
clear in class AbstractCollection<Right>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Right>
Specified by:
contains in interface Set<Right>
Overrides:
contains in class AbstractCollection<Right>

containsAll

public boolean containsAll(Collection<?> objects)
Specified by:
containsAll in interface Collection<Right>
Specified by:
containsAll in interface Set<Right>
Overrides:
containsAll in class AbstractCollection<Right>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Right>
Specified by:
remove in interface Set<Right>
Overrides:
remove in class AbstractCollection<Right>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Right>
Specified by:
isEmpty in interface Set<Right>
Overrides:
isEmpty in class AbstractCollection<Right>

retainAll

public boolean retainAll(Collection<?> objects)
Specified by:
retainAll in interface Collection<Right>
Specified by:
retainAll in interface Set<Right>
Overrides:
retainAll in class AbstractCollection<Right>

size

public int size()
Specified by:
size in interface Collection<Right>
Specified by:
size in interface Set<Right>
Specified by:
size in class AbstractCollection<Right>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Right>
Specified by:
toArray in interface Set<Right>
Overrides:
toArray in class AbstractCollection<Right>

toArray

public <T> T[] toArray(T[] ts)
Specified by:
toArray in interface Collection<Right>
Specified by:
toArray in interface Set<Right>
Overrides:
toArray in class AbstractCollection<Right>

toString

public String toString()
Overrides:
toString in class AbstractCollection<Right>

clone

public RightSet clone()
               throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException


Copyright © 2004–2014 XWiki. All rights reserved.