|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.security.Authorizations
public class Authorizations
A collection of authorization strings.
Field Summary | |
---|---|
static Authorizations |
EMPTY
An empty set of authorizations. |
static String |
HEADER
A special header string used when serializing instances of this class. |
Constructor Summary | |
---|---|
Authorizations()
Constructs an empty set of authorizations. |
|
Authorizations(byte[] authorizations)
Constructs an authorizations object from a serialized form. |
|
Authorizations(Collection<byte[]> authorizations)
Constructs an authorization object from a collection of string authorizations that have each already been encoded as UTF-8 bytes. |
|
Authorizations(List<ByteBuffer> authorizations)
Constructs an authorization object from a list of string authorizations that have each already been encoded as UTF-8 bytes. |
|
Authorizations(String... authorizations)
Constructs an authorizations object from a set of human-readable authorizations. |
Method Summary | |
---|---|
boolean |
contains(byte[] auth)
Checks whether this object contains the given authorization. |
boolean |
contains(ByteSequence auth)
Checks whether this object contains the given authorization. |
boolean |
contains(String auth)
Checks whether this object contains the given authorization. |
boolean |
equals(Object o)
|
List<byte[]> |
getAuthorizations()
Gets the authorizations in sorted order. |
byte[] |
getAuthorizationsArray()
Returns a serialized form of these authorizations. |
List<ByteBuffer> |
getAuthorizationsBB()
Gets the authorizations in sorted order. |
int |
hashCode()
|
boolean |
isEmpty()
Checks if this collection of authorizations is empty. |
Iterator<byte[]> |
iterator()
|
String |
serialize()
Returns a serialized form of these authorizations. |
int |
size()
Gets the size of this collection of authorizations. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Authorizations EMPTY
public static final String HEADER
serialize()
,
Constant Field ValuesConstructor Detail |
---|
public Authorizations(Collection<byte[]> authorizations)
authorizations
- collection of authorizations, as strings encoded in UTF-8
IllegalArgumentException
- if authorizations is nullAuthorizations(String...)
public Authorizations(List<ByteBuffer> authorizations)
authorizations
- list of authorizations, as strings encoded in UTF-8 and placed in buffers
IllegalArgumentException
- if authorizations is nullAuthorizations(String...)
public Authorizations(byte[] authorizations)
authorizations
- a serialized authorizations string produced by getAuthorizationsArray()
or serialize()
, converted to UTF-8 bytes
IllegalArgumentException
- if authorizations is nullpublic Authorizations()
Authorizations(String...)
public Authorizations(String... authorizations)
authorizations
- array of authorizations
IllegalArgumentException
- if authorizations is nullMethod Detail |
---|
public byte[] getAuthorizationsArray()
serialize()
public List<byte[]> getAuthorizations()
Authorizations(Collection)
public List<ByteBuffer> getAuthorizationsBB()
public String toString()
toString
in class Object
public boolean contains(byte[] auth)
auth
- authorization, as a string encoded in UTF-8
public boolean contains(ByteSequence auth)
contains
in interface AuthorizationContainer
auth
- authorization, as a string encoded in UTF-8
public boolean contains(String auth)
auth
- authorization
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int size()
public boolean isEmpty()
public Iterator<byte[]> iterator()
iterator
in interface Iterable<byte[]>
public String serialize()
Authorizations(byte[])
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |