edu.stanford.rt.credential
Class DataValuePrincipal
java.lang.Object
|
+--edu.stanford.rt.credential.Principal
|
+--edu.stanford.rt.credential.DataValuePrincipal
- All Implemented Interfaces:
- PrincipalExpression, java.io.Serializable
- public class DataValuePrincipal
- extends Principal
- Author:
- Ninghui Li, Sandra Qiu
This class handles Principal
element, which consists of
IntegerValue or StringValue.
- See Also:
- Serialized Form
Field Summary |
private DataValue |
value
the principal value, which could be an integer or a string. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
value
private DataValue value
- the principal value, which could be an integer or a string.
DataValuePrincipal
public DataValuePrincipal(DataValue value)
- Constructor for DataValuePrincipal.
Contruct a Principal object using a DataValue object.
DomainSpecException is thrown if value passed in is not an instance of
IntegerValue, StringValue, or KeyValue.
IllegalArgumentException
is thrown if value
is not of IntegerValue
or StringValue
type.
getValue
public DataValue getValue()
- Method getValue.
- Returns:
- DataValue
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object value)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
toString
in interface PrincipalExpression
- Overrides:
toString
in class Principal