com.metamatrix.platform.security.api
Class MetaMatrixPrincipalName

java.lang.Object
  extended by com.metamatrix.platform.security.api.MetaMatrixPrincipalName
All Implemented Interfaces:
java.io.Serializable

public class MetaMatrixPrincipalName
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
protected MetaMatrixPrincipalName(MetaMatrixPrincipalName obj)
           
  MetaMatrixPrincipalName(java.lang.String name, int type)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares this object to another.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Returns the name of this principal.
 int getType()
          Get the type of principal
 java.lang.String getTypeLabel()
          Get the String form for the type of principal.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaMatrixPrincipalName

public MetaMatrixPrincipalName(java.lang.String name,
                               int type)

MetaMatrixPrincipalName

protected MetaMatrixPrincipalName(MetaMatrixPrincipalName obj)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the MetaMatrixPrincipalName class, then this method compares the contents; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class).

Note: this method is consistent with equals(), meaning that (compareTo(x, y)==0) == (x.equals(y)).

Parameters:
obj - the object that this instance is to be compared to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object, respectively.
Throws:
java.lang.IllegalArgumentException - if the specified object reference is null
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this instance.

getType

public int getType()
Get the type of principal

Returns:
the type for this principal

getTypeLabel

public java.lang.String getTypeLabel()
Get the String form for the type of principal.

Returns:
the type for this principal as a String

getName

public java.lang.String getName()
Returns the name of this principal.

Returns:
the name of this principal (never null)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.