net.jini.entry
Class AbstractEntry

java.lang.Object
  extended bynet.jini.entry.AbstractEntry
All Implemented Interfaces:
Entry, Serializable
Direct Known Subclasses:
Address, Comment, Location, Name, ServiceInfo, ServiceType, Status

public abstract class AbstractEntry
extends Object
implements Entry

This class is a specific, generally useful base class for entry types. An entry does not need to subclass this type, but you may find it useful to do so.

See Also:
Entry, Serialized Form

Constructor Summary
AbstractEntry()
           
 
Method Summary
static boolean equals(Entry e1, Entry e2)
          Returns true if the two objects have the same value.
 boolean equals(Object other)
          Returns true if the other object has the same value as this one.
 int hashCode()
          Returns a hash code.
static int hashCode(Entry entry)
          Returns a hash code.
 String toString()
          Print out the entry as the sum of all its fields.
static String toString(Entry entry)
          Print out the given entry as the sum of all its fields.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEntry

public AbstractEntry()
Method Detail

equals

public boolean equals(Object other)
Returns true if the other object has the same value as this one. This means that the other object is of the same class, and that, for each field F of the class, references in both objects are null or equals returns true when invoked on the value of F from one object with the other object as a parameter.


equals

public static boolean equals(Entry e1,
                             Entry e2)
Returns true if the two objects have the same value. This means that both objects are of the same class, and that, for each field F of the class, references in both objects are null or equals returns true when invoked on the value of F from one object with the other object as a parameter.

Parameters:
e1 - an entry object to compare to e2
e2 - an entry object to compare to e1
Returns:
true if the two objects have the same value

hashCode

public int hashCode()
Returns a hash code. The hash code will be zero XOR the hash code of each non-null field. Overrides Object.hashCode().


hashCode

public static int hashCode(Entry entry)
Returns a hash code. The hash code will be zero XOR the hash code of each non-null field.

Parameters:
entry - the entry for which to generate a hash code
Returns:
the hash code value for the given entry

toString

public String toString()
Print out the entry as the sum of all its fields. Overrides Object.toString().


toString

public static String toString(Entry entry)
Print out the given entry as the sum of all its fields.

Parameters:
entry - an entry to represent as a String
Returns:
a String representing each of the fields of the entry


Copyright © 2003 Sun Microsystems, Inc. All rights reserved