| CONTENTS | PREV | NEXT | A Collection of Jini(TM) Technology Helper Utilities and Services Specifications |
EU - JiniTM Entry Utilities Specification
EU.1 Entry Utilities
Entries are designed to be used in distributed algorithms for which exact-match lookup semantics are useful. An entry is a typed set of objects, each of which may be tested for exact match with a template. The details of entries and their semantics are discussed in Jini Technology Core Platform Specification, "Entry".
When designing entries, certain tasks are commonly done in similar ways. This specification defines a utility class for such common tasks.
EU.1.1 AbstractEntry
The class
net.jini.entry.AbstractEntryis a specific implementation ofEntrythat provides useful implementations ofequals,hashCode, andtoString:package net.jini.entry; public abstract class AbstractEntry implements Entry { public boolean equals(Object o) {...} public int hashCode() {...} public String toString() {...} public static boolean equals(Entry e1, Entry e2) {...} public static int hashCode(Entry entry) {...} public static String toString(Entry entry) {...} }The static method
AbstractEntry.equalsreturnstrueif and only if the two entries are of the same class and for each field F, the two objects' values for F are either bothnullor the invocation ofequalson one object's value for F with the other object's value for F as its parameter returnstrue. The static methodhashCodereturns zero XOR thehashCodeinvoked on each non-nullfield of the entry. The static methodtoStringreturns a string that contains each field's name and value. The non-static methodsequals,hashCode, andtoStringreturn a result equivalent to invoking the corresponding static method withthisas the first argument.EU.1.2 Serialized Form
Class serialVersionUID Serialized Fields AbstractEntry5071868345060424804L noneEU.1.3 Comments
Please direct comments to jini-comments@java.sun.com.
| CONTENTS | PREV | NEXT | A Collection of Jini(TM) Technology Helper Utilities and Services Specifications |