org.neo4j.graphdb
Class DynamicLabel

java.lang.Object
  extended by org.neo4j.graphdb.DynamicLabel
All Implemented Interfaces:
Label

public class DynamicLabel
extends Object
implements Label

A dynamically instantiated and named Label. This class is a convenience implementation of Label that is typically used when labels are created and named after a condition that can only be detected at runtime. For statically known labels please consider the enum approach as described in Label documentation.

See Also:
Label

Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
static Label label(String labelName)
           
 String name()
          Returns the name of the label.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

label

public static Label label(String labelName)
Parameters:
labelName - the name of the label.
Returns:
a Label instance for the given labelName.

name

public String name()
Description copied from interface: Label
Returns the name of the label. The name uniquely identifies a label, i.e. two different Label instances with different object identifiers (and possibly even different classes) are semantically equivalent if they have equal names.

Specified by:
name in interface Label
Returns:
the name of the label

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.