org.gcube.contentmanagement.contentmanager.stubs.model.trees
Class Leaf

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.stubs.model.trees.Node
      extended by org.gcube.contentmanagement.contentmanager.stubs.model.trees.Leaf

public final class Leaf
extends Node

A Node with an inner value but without an identity or outgoing edges.

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.contentmanagement.contentmanager.stubs.model.trees.Node
Node.State
 
Constructor Summary
Leaf(Leaf l)
          Copy constructor, creates a clone of a given node.
Leaf(java.lang.String id)
          Creates an instance with a given identifier.
Leaf(java.lang.String v, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes)
          Creates an instance with given attributes and a given value.
Leaf(java.lang.String id, Node.State state, java.lang.String v, java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes)
          Creates an instance with a given identifier, given attributes, and a given value.
Leaf(java.lang.String id, java.lang.String v)
          Creates an instance with a given identifier and a given value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int hashCode()
          
 java.lang.String toString()
          
 java.lang.String value()
          Returns the inner value.
 void value(java.lang.String v)
          Sets the inner value.
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.stubs.model.trees.Node
ancestors, ancestorsAndSelf, attribute, attribute, attribute, attributes, hasAttribute, hasAttribute, hasAttribute, id, parent, removeAttribute, removeAttribute, removeAttribute, setAttribute, setAttribute, setAttribute, state, uri
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Leaf

public Leaf(Leaf l)
Copy constructor, creates a clone of a given node.

Parameters:
n - the node.

Leaf

public Leaf(java.lang.String id)
Creates an instance with a given identifier.

Parameters:
id - the identifier.

Leaf

public Leaf(java.lang.String id,
            java.lang.String v)
Creates an instance with a given identifier and a given value.

Parameters:
id - the identifier.
v - the value.

Leaf

public Leaf(java.lang.String v,
            java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes)
Creates an instance with given attributes and a given value. * @param v the value.

Parameters:
attributes - the attributes.

Leaf

public Leaf(java.lang.String id,
            Node.State state,
            java.lang.String v,
            java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes)
Creates an instance with a given identifier, given attributes, and a given value.

Parameters:
id - the identifier.
v - the value.
attributes - the attributes.
Method Detail

value

public java.lang.String value()
Returns the inner value.

Returns:
the value.

value

public void value(java.lang.String v)
           throws java.lang.IllegalArgumentException
Sets the inner value.

Parameters:
v - the value.
Throws:
java.lang.IllegalArgumentException

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class Node

hashCode

public int hashCode()

Overrides:
hashCode in class Node