canguru
Class PMap.PKey

java.lang.Object
  |
  +--canguru.PMap.PKey
Enclosing class:
PMap

private class PMap.PKey
extends java.lang.Object

Classe responsável por gerar chaves imutáveis que serão usadas em PMap

Version:
$Id: PMap.java,v 1.7 2003/11/11 14:17:35 fernanda Exp $

Field Summary
private  java.lang.Object o
          Objeto imutável usado como chave
 
Constructor Summary
(package private) PMap.PKey(java.lang.Object o)
          Cria uma nova chave imutável
 
Method Summary
 boolean equals(java.lang.Object o)
          Compara o objeto dado à chave, verificando se são iguais.
 java.lang.Object getObject()
          Retorna a chave imutável
 int hashCode()
          Retorna o valor do hash code para esta chave
 java.lang.String toString()
          Retorna representação textual de PKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

o

private final java.lang.Object o
Objeto imutável usado como chave

Constructor Detail

PMap.PKey

PMap.PKey(java.lang.Object o)
Cria uma nova chave imutável

Parameters:
o - Objeto chave
Method Detail

equals

public boolean equals(java.lang.Object o)
Compara o objeto dado à chave, verificando se são iguais.

Overrides:
equals in class java.lang.Object
Parameters:
o - Objeto a ser comparado com esta chave
Returns:
true se o objeto for instância de PKey e for igual esta chave

getObject

public java.lang.Object getObject()
Retorna a chave imutável

Returns:
chave imutável

hashCode

public int hashCode()
Retorna o valor do hash code para esta chave

Overrides:
hashCode in class java.lang.Object
Returns:
valor do hash code para esta chave

toString

public java.lang.String toString()
Retorna representação textual de PKey

Overrides:
toString in class java.lang.Object
Returns:
representação textual de PKey