net.jini.entry
Class AbstractEntry
java.lang.Object
|
+--net.jini.entry.AbstractEntry
- Direct Known Subclasses:
- Address, Comment, Location, Name, ServiceInfo, ServiceType, Status
- public abstract class AbstractEntry
- extends java.lang.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
Method Summary |
static boolean |
equals(Entry e1,
Entry e2)
Returns true if the two objects have the same value. |
boolean |
equals(java.lang.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. |
java.lang.String |
toString()
Print out the entry as the sum of all its fields |
static java.lang.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 |
AbstractEntry
public AbstractEntry()
equals
public boolean equals(java.lang.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.
- Overrides:
- equals in class java.lang.Object
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.
hashCode
public int hashCode()
- Returns a hash code. The hash code will be zero XOR the hash
code of each non-
null
field.
- Overrides:
- hashCode in class java.lang.Object
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.
toString
public java.lang.String toString()
- Print out the entry as the sum of all its fields
- Overrides:
- toString in class java.lang.Object
toString
public static java.lang.String toString(Entry entry)
- Print out the given entry as the sum of all its fields.
Copyright © 1999 Sun Microsystems, Inc. All rights reserved