org.insolina.ydom
Class KeyValuePair

java.lang.Object
  extended by org.insolina.ydom.YamlNode
      extended by org.insolina.ydom.KeyValuePair

public class KeyValuePair
extends YamlNode

This class represents a Yaml Key Value Pair. In the Yaml document this is a pair of items separated by a colon.


Constructor Summary
KeyValuePair(java.lang.String key, YamlNode value)
          Create an immutable KeyValuePair object.
 
Method Summary
 java.util.List<YamlNode> getChildren()
          Return the children of this YamlNode
 java.lang.String getKey()
           
 YamlNode getValue()
           
 void print()
          Print out the contents of the key value pair.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyValuePair

public KeyValuePair(java.lang.String key,
                    YamlNode value)
Create an immutable KeyValuePair object.

Parameters:
key -
value -
Method Detail

getChildren

public java.util.List<YamlNode> getChildren()
Description copied from class: YamlNode
Return the children of this YamlNode

Specified by:
getChildren in class YamlNode
Returns:
List of YamlNode

print

public void print()
Print out the contents of the key value pair.

Specified by:
print in class YamlNode

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getKey

public java.lang.String getKey()
Returns:
String the key

getValue

public YamlNode getValue()
Returns:
YamlNode the value