|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.javamud.data.Right
A Right represents being allowed to do something.
Rights are immutable, and therefor thread safe.
A Right has no concept of who has the Right, nor what the Right
applies to. There is also no concept of inheritance nor whether this
is a granting or a revoking.
Rights do NOT implement SISCapable as their internal
String is inherently single instance via the intern() call.
SISCapable| Field Summary | |
protected int |
depth
"Depth" of field. |
static int |
maxQuality
Maximum allowably quality value. |
protected String |
name
Name of the right. |
| Constructor Summary | |
Right(String setName)
Constructor for the Right object |
|
| Method Summary | |
int |
compareTo(Object o)
See java.lang.Comparable. |
static int |
Depth(String s)
Description of the Method |
boolean |
equals(Object o)
Equality test. |
int |
getDepth()
Gets the depth attribute of the Right object |
protected static int |
getDepth(String str)
Calculates the depth of the given Right String. |
String |
getName()
Gets the name attribute of the Right object |
int |
hashCode()
Returns name.hashCode(). |
boolean |
impliedBy(Right impliesMe)
The same as impliesMe .implies(this). |
boolean |
impliedBy(String impliesMe)
Returns true if impliesMe implies this right. |
protected static boolean |
implies_impl(String a,
String b)
Implementation of implies and impliedBy functions. |
boolean |
implies(Right iImply)
If iImply is implied by this Right. |
boolean |
implies(String iImply)
If iImply is implied by this Right. |
protected int |
impliesQuality_impl(String iImply)
Returns a quality of match associated with the implies operation. |
int |
impliesQuality(Right right)
Quality of implies match. |
int |
impliesQuality(String right)
Quality of implies match. |
static String |
Resolve(String s)
Resolves a String in to a correct Right string. |
String |
toString()
Returns name which is already a String representation of the
Right. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int maxQuality
protected int depth
protected String name
| Constructor Detail |
public Right(String setName)
setName - The right that this object represents.| Method Detail |
public int getDepth()
public String getName()
protected static int getDepth(String str)
str - String to get depth of.
public static int Depth(String s)
s - Description of the Parameter
public static String Resolve(String s)
s - String to resolve.
public int compareTo(Object o)
throws ClassCastException
java.lang.Comparable.
compareTo in interface Comparableo - See java.lang.Comparable.
java.lang.Comparable.
ClassCastException - See java.lang.Comparable.Comparablepublic boolean equals(Object o)
Right or a String.
equals in class Objecto - See Object
ObjectObjectpublic int hashCode()
hashCode in class Objectpublic boolean impliedBy(String impliesMe)
impliesMe - A right.
implies(String),
implies(Right),
impliedBy(Right)public boolean impliedBy(Right impliesMe)
impliesMe .implies(this).
impliesMe - Right to test.
public boolean implies(String iImply)
iImply - Right to test.
public boolean implies(Right iImply)
iImply - Right to test.
public int impliesQuality(Right right)
right - Right to compare.
public int impliesQuality(String right)
right - Right to compare.
public String toString()
name which is already a String representation of the
Right.
toString in class Objectnameprotected int impliesQuality_impl(String iImply)
maxQuality for no match, 0 for perfect match, >0 for imperfect
match. Lower qualities are a closer match.
iImply - Right to test. MUST be Resolve(java.lang.String)()d.
protected static boolean implies_impl(String a,
String b)
Resolve(java.lang.String)()d.
a - String that may imply bb - String that may be implied by a
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||