org.yaml.snakeyaml.nodes
Class Node

java.lang.Object
  extended by org.yaml.snakeyaml.nodes.Node
Direct Known Subclasses:
CollectionNode, ScalarNode

public abstract class Node
extends Object

See Also:
PyYAML for more information

Field Summary
protected  Mark endMark
           
protected  boolean explicitTag
           
 
Constructor Summary
Node(String tag, Mark startMark, Mark endMark)
           
 
Method Summary
 boolean equals(Object obj)
           
 Mark getEndMark()
           
abstract  NodeId getNodeId()
          For error reporting.
 Mark getStartMark()
           
 String getTag()
           
 Class<? extends Object> getType()
           
 boolean hasExplicitTag()
          Check if the tag is defined in the YAML document
 int hashCode()
           
 boolean isTwoStepsConstruction()
           
 void setTag(String tag)
           
 void setTwoStepsConstruction(boolean twoStepsConstruction)
           
 void setType(Class<? extends Object> type)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endMark

protected Mark endMark

explicitTag

protected boolean explicitTag
Constructor Detail

Node

public Node(String tag,
            Mark startMark,
            Mark endMark)
Method Detail

getTag

public String getTag()

getEndMark

public Mark getEndMark()

getNodeId

public abstract NodeId getNodeId()
For error reporting.

Returns:
scalar, sequence, mapping
See Also:
variable 'id' in PyYAML

getStartMark

public Mark getStartMark()

setTag

public void setTag(String tag)

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

getType

public Class<? extends Object> getType()

setType

public void setType(Class<? extends Object> type)

setTwoStepsConstruction

public void setTwoStepsConstruction(boolean twoStepsConstruction)

isTwoStepsConstruction

public boolean isTwoStepsConstruction()

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

hasExplicitTag

public boolean hasExplicitTag()
Check if the tag is defined in the YAML document

Returns:
true when the tag is explicit, false when the tag is resolved


Copyright © 2008-2009. All Rights Reserved.