Java 2 Útikalauz programozóknak 5.0

elte.java2_utikalauz5.security
SamplePrincipal osztály

java.lang.Object
  extended by elte.java2_utikalauz5.security.SamplePrincipal
Megvalósított interfészek:
Serializable, Principal

public class SamplePrincipal
extends Object
implements Principal, Serializable

This class implements the Principal interface and represents a Sample user.

Principals such as this SamplePrincipal may be associated with a particular Subject to augment that Subject with an additional identity. Refer to the Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

Verzió:
1.4, 01/11/00
Lásd még:
Principal, Subject, Szerializált forma

Mezők
private  String name
           
 
Konstruktorok
SamplePrincipal(String name)
          Create a SamplePrincipal with a Sample username.
 
Metódusok
 boolean equals(Object o)
          Compares the specified Object with this SamplePrincipal for equality.
 String getName()
          Return the Sample username for this SamplePrincipal.
 int hashCode()
          Return a hash code for this SamplePrincipal.
 String toString()
          Return a string representation of this SamplePrincipal.
 
java.lang.Object osztálytól örökölt metódusok
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Mezők részletezése

name

private String name
Konstruktorok részletezése

SamplePrincipal

public SamplePrincipal(String name)
Create a SamplePrincipal with a Sample username.

Paraméterek:
name - the Sample username for this user.
Specifikált kivételek:
NullPointerException - if the name is null.
Metódusok részletezése

getName

public String getName()
Return the Sample username for this SamplePrincipal.

Megvalósítja:
Principal interfész getName metódusát
Visszaadott érték:
the Sample username for this SamplePrincipal

toString

public String toString()
Return a string representation of this SamplePrincipal.

Megvalósítja:
Principal interfész toString metódusát
Felüldefiniálja:
Object osztály toString metódusát
Visszaadott érték:
a string representation of this SamplePrincipal.

equals

public boolean equals(Object o)
Compares the specified Object with this SamplePrincipal for equality. Returns true if the given object is also a SamplePrincipal and the two SamplePrincipals have the same username.

Megvalósítja:
Principal interfész equals metódusát
Felüldefiniálja:
Object osztály equals metódusát
Paraméterek:
o - Object to be compared for equality with this SamplePrincipal.
Visszaadott érték:
true if the specified Object is equal equal to this SamplePrincipal.

hashCode

public int hashCode()
Return a hash code for this SamplePrincipal.

Megvalósítja:
Principal interfész hashCode metódusát
Felüldefiniálja:
Object osztály hashCode metódusát
Visszaadott érték:
a hash code for this SamplePrincipal.

Java 2 Útikalauz programozóknak 5.0