com.wm.app.b2b.server
Class Credentials

java.lang.Object
  extended by com.wm.app.b2b.server.Credentials

public class Credentials
extends java.lang.Object

Represents a set of Credential objects. This set contains at most one of each type of credential (see the Credential class for information about credential types).

See Also:
Credential

Constructor Summary
Credentials()
          Creates a new list of credentials.
 
Method Summary
 void add(Credential cred)
          Adds the specified credential.
 boolean check(Credential cred)
          Checks for existence and matching of this credential.
 boolean equals(Credentials creds)
          Matches against another set of credentials.
 Credential get(int aType)
          Gets the credential of the supplied type in this set.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Credentials

public Credentials()
Creates a new list of credentials.

Method Detail

add

public void add(Credential cred)
Adds the specified credential.

Parameters:
cred - The credential to add.

check

public boolean check(Credential cred)
Checks for existence and matching of this credential.

Parameters:
cred - The cred to check against
Returns:
Do we have a cred of this type and if so, does it match?

get

public Credential get(int aType)
Gets the credential of the supplied type in this set.

Parameters:
aType - The type code of the credential to fetch.
Returns:
The credential in question (null if there isn't one).

equals

public boolean equals(Credentials creds)
Matches against another set of credentials. Two sets match if their corresponding elements exist and match.

Parameters:
creds - The creds to match against.
Returns:
Do the two sets of credentials match?

toString

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