|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.presenter.Problem
public class Problem
Describes a problem in a part.
Nested Class Summary | |
---|---|
private static class |
Problem.ProblemRecorder
Problem reporter that creates a list of problems. |
Field Summary | |
---|---|
private static int |
HASH_CODE_MULTIPLIER
Multiplier used when combining hash codes. |
private static int |
HASH_CODE_SEED
Seed value used when combining hash codes. |
private org.openpermis.policy.PartProblemReporter.ProblemMessage |
message
The type of problem. |
private Object[] |
parameters
Additional parameters for the problem. |
private org.openpermis.policy.bean.PartBean |
part
The part that has a problem. |
Constructor Summary | |
---|---|
Problem(org.openpermis.policy.bean.PartBean part,
org.openpermis.policy.PartProblemReporter.ProblemMessage message,
Object... parameters)
Creates a new problem for the specified part, type and parameters. |
Method Summary | |
---|---|
static List<Problem> |
createProblemList(org.openpermis.policy.Policy policy)
Creates a list of problem for the specified policy. |
private boolean |
equalParameter(Object o1,
Object o2)
Compare two parameters if they are equivalent. |
private boolean |
equalParameters(Problem other)
Check if the paramters of this problem are the same as the ones of the other problem. |
private boolean |
equalPart(Problem other)
Check if the other problem has the same part. |
boolean |
equals(Object obj)
|
org.openpermis.policy.PartProblemReporter.ProblemMessage |
getMessage()
Returns the type of the problem. |
Object[] |
getParameters()
Returns the problem parameters. |
org.openpermis.policy.bean.PartBean |
getPart()
Returns the part that has a problem. |
org.openpermis.policy.bean.SerialNumber |
getPartSerialNumber()
Returns the serial number of the part that has a problem. |
int |
hashCode()
|
private int |
parameterHash(Object parameter)
Returns the hash code of a parameter. |
private int |
parametersHashCodes()
Creates a single hash code for all parameters. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final int HASH_CODE_SEED
17
private static final int HASH_CODE_MULTIPLIER
37
private final org.openpermis.policy.bean.PartBean part
private final org.openpermis.policy.PartProblemReporter.ProblemMessage message
private final Object[] parameters
Constructor Detail |
---|
public Problem(org.openpermis.policy.bean.PartBean part, org.openpermis.policy.PartProblemReporter.ProblemMessage message, Object... parameters)
part
- the part that has a problem.message
- the type of problem.parameters
- additional parameters for the problem.Method Detail |
---|
public static final List<Problem> createProblemList(org.openpermis.policy.Policy policy)
policy
- the policy for which to create the problem list.
null
.public org.openpermis.policy.bean.SerialNumber getPartSerialNumber()
public org.openpermis.policy.bean.PartBean getPart()
public org.openpermis.policy.PartProblemReporter.ProblemMessage getMessage()
public Object[] getParameters()
private boolean equalPart(Problem other)
other
- the other problem to compare to.
true
if it has the same part, false
otherwise.private boolean equalParameter(Object o1, Object o2)
PartBean
objects are compared by serial.
o1
- the first parameter, not null
.o2
- the second parameter, may be null
.
true
if they are equivalent or have the same serial,
false
otherwise.private boolean equalParameters(Problem other)
other
- the other problem to compare the paramters to.
true
if they have the same parameters, false
otherwise.private int parameterHash(Object parameter)
parameter
- the parameter for which to retrieve the hash code.
private int parametersHashCodes()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG