org.mulgara.mrg
Class Bnode

java.lang.Object
  extended by org.mulgara.mrg.Bnode
All Implemented Interfaces:
Comparable<Node>, Node, ObjectNode, SubjectNode

public class Bnode
extends Object
implements SubjectNode, ObjectNode

A blank node.


Field Summary
static int TYPE_ID
          The type identifier for Bnode
 
Constructor Summary
Bnode()
          Create a new anonymous blank node.
Bnode(String label)
          Create a new blank node.
 
Method Summary
 int compareTo(Node o)
          Compares this object with the specified object for order.
 boolean equals(Object o)
          Equality method.
 String getLabel()
          Gets the "label" portion of the node ID
 int getTypeId()
          A type identifier to distinguish from the other types of Node.
 int hashCode()
          The hashcode, based on the label.
 String toString()
          Represents this node as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_ID

public static final int TYPE_ID
The type identifier for Bnode

See Also:
Constant Field Values
Constructor Detail

Bnode

public Bnode(String label)
Create a new blank node.

Parameters:
label - The label used to uniquely identify the node.

Bnode

public Bnode()
Create a new anonymous blank node.

Method Detail

equals

public boolean equals(Object o)
Equality method. Based on the label.

Overrides:
equals in class Object

hashCode

public int hashCode()
The hashcode, based on the label.

Overrides:
hashCode in class Object

toString

public String toString()
Represents this node as a string.

Overrides:
toString in class Object

getLabel

public String getLabel()
Gets the "label" portion of the node ID


getTypeId

public int getTypeId()
A type identifier to distinguish from the other types of Node.

Specified by:
getTypeId in interface Node

compareTo

public int compareTo(Node o)
Compares this object with the specified object for order.

Specified by:
compareTo in interface Comparable<Node>
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.


Copyright © 2011. All Rights Reserved.