com.threerings.presents.peer.data
Class NodeObject.Lock
java.lang.Object
com.threerings.io.SimpleStreamableObject
com.threerings.presents.peer.data.NodeObject.Lock
- All Implemented Interfaces:
- Streamable, DSet.Entry, Comparable<NodeObject.Lock>
- Enclosing class:
- NodeObject
public static class NodeObject.Lock
- extends SimpleStreamableObject
- implements Comparable<NodeObject.Lock>, DSet.Entry
Identifies a locked resource.
|
Field Summary |
Comparable<?> |
id
The resource identifier, which can be null for singleton resources. |
String |
type
The resource type. |
type
public final String type
- The resource type. Only resources of the same type will have their ids compared.
id
public final Comparable<?> id
- The resource identifier, which can be
null for singleton resources.
NodeObject.Lock
public NodeObject.Lock(String type,
Comparable<?> id)
compareTo
public int compareTo(NodeObject.Lock olock)
- Specified by:
compareTo in interface Comparable<NodeObject.Lock>
getKey
public Comparable<?> getKey()
- Description copied from interface:
DSet.Entry
- Each entry provide an associated key which is used to determine its uniqueness in the
set. See the
DSet class documentation for further information.
- Specified by:
getKey in interface DSet.Entry
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object