|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.predicate.AbstractPredicate<T>
T
- type of the operands.public abstract class AbstractPredicate<T>
A node in the predicate tree consisting in a predicate having two generic operands.
Field Summary |
---|
Fields inherited from interface org.openpermis.policy.Predicate |
---|
FALSE, TRUE |
Constructor Summary | |
---|---|
AbstractPredicate(T... operands)
Creates an abstract predicate with operands. |
Method Summary | |
---|---|
protected abstract boolean |
comparablePredicate(Predicate predicate)
Compares the type of predicate with this. |
boolean |
equals(Object obj)
Check if this policy part is equivalent to the one specified. |
T |
getOperand(int index)
Returns the n-th operand of this predicate. |
int |
getOperandCount()
Returns the number of operands. |
List<T> |
getOperands()
Returns a list of operands. |
int |
hashCode()
Returns the hash code of this policy part. |
boolean |
isValid(PartProblemReporter reporter)
Check if this part and all parts contained are valid. |
protected abstract int |
partHashCode()
Returns the hash code of this part. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openpermis.policy.Predicate |
---|
isMatchable, isValid, matches |
Methods inherited from interface org.openpermis.policy.Part |
---|
toString |
Constructor Detail |
---|
public AbstractPredicate(T... operands)
operands
- an array of operands.Method Detail |
---|
public int getOperandCount()
public T getOperand(int index)
index
- the position of the desired operand.
public List<T> getOperands()
protected abstract boolean comparablePredicate(Predicate predicate)
predicate
- a Predicate
.
protected abstract int partHashCode()
public final boolean isValid(PartProblemReporter reporter)
Part
Instead of enforcing that a part is valid at all times a part may be invalid (for example while loading a policy from a file or while editing a part). Use this method to assert that a part is valid.
isValid
in interface Part
reporter
- optional callback where violiations are reported, may be null
if the caller is not interested in details about the violations.
true
if the part and all parts contained are valid,
false
if this part or at least one part contained are invalid.public final boolean equals(Object obj)
Part
A part is considered equivalent to this part if it's state is equivalent to the state of this part and all parts contained are equivalent to the parts contained in this policy part.
equals
in interface Part
equals
in class Object
obj
- the policy part to compare this policy part to.Part.hashCode()
public final int hashCode()
Part
In addition to the general contract for Object.hashCode()
the hash code
of a policy part should not make use of the default object hash code. Instead the
hash code of a policy part should only be calculated according to the contents of
the policy part in such a way that different instances of a policy part with the
same content return the same hash code.
hashCode
in interface Part
hashCode
in class Object
Part.equals(Object)
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG