org.apache.jackrabbit.core
Class NodeId

java.lang.Object
  extended byorg.apache.jackrabbit.core.ItemId
      extended byorg.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)


toString

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


hashCode

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



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