package org.yaml.snakeyaml.nodes;

public final class NodeTuple {
   private Node keyNode;
   private Node valueNode;

   public NodeTuple(Node keyNode, Node valueNode) {
      if (keyNode != null && valueNode != null) {
         this.keyNode = keyNode;
         this.valueNode = valueNode;
      } else {
         throw new NullPointerException("Nodes must be provided.");
      }
   }

   public final Node getKeyNode() {
      return this.keyNode;
   }

   public final Node getValueNode() {
      return this.valueNode;
   }

   public String toString() {
      return "<NodeTuple keyNode=" + this.keyNode.toString() + "; valueNode=" + this.valueNode.toString() + ">";
   }
}
