org.apache.jackrabbit.core
Class NodeId

java.lang.Object
  extended by org.apache.jackrabbit.core.ItemId
      extended by org.apache.jackrabbit.core.NodeId
All Implemented Interfaces:
Serializable

public class NodeId
extends ItemId

Node identifier. An instance of this class identifies a node using its UUID. Once created a node identifier instance is immutable.

See Also:
Serialized Form

Constructor Summary
NodeId(UUID uuid)
          Creates a node identifier instance for the identified node.
 
Method Summary
 boolean denotesNode()
          Returns true as this class represents a node identifier, not a property identifier.
 boolean equals(Object obj)
          
 UUID getUUID()
          Returns the UUID of the identified node.
 int hashCode()
           Returns the same as this.getUUID().hashCode()
 String toString()
           Returns the same as this.getUUID().toString()
static NodeId valueOf(String s)
          Returns a NodeId holding the value of the specified string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeId

public NodeId(UUID uuid)
Creates a node identifier instance for the identified node.

Parameters:
uuid - node UUID
Method Detail

denotesNode

public boolean denotesNode()
Returns true as this class represents a node identifier, not a property identifier.

Specified by:
denotesNode in class ItemId
Returns:
always true
See Also:
ItemId.denotesNode()

getUUID

public UUID getUUID()
Returns the UUID of the identified node.

Returns:
node UUID

valueOf

public static NodeId valueOf(String s)
                      throws IllegalArgumentException
Returns a NodeId holding the value of the specified string. The string must be in the format returned by the NodeId.toString() method.

Parameters:
s - a String containing the NodeId representation to be parsed.
Returns:
the NodeId represented by the argument
Throws:
IllegalArgumentException - if the specified string can not be parsed as a NodeId.
See Also:
toString()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()
Returns the same as this.getUUID().toString()

Overrides:
toString in class Object

hashCode

public int hashCode()
Returns the same as this.getUUID().hashCode()

Overrides:
hashCode in class Object


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.