xtc.parser
Class ProperListValue

java.lang.Object
  extended by xtc.tree.Node
      extended by xtc.parser.Element
          extended by xtc.parser.ValueElement
              extended by xtc.parser.ListValue
                  extended by xtc.parser.ProperListValue
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, InternalElement, Locatable

public class ProperListValue
extends ListValue

Element to set the semantic value to a list.

Version:
$Revision: 1.7 $
Author:
Robert Grimm

Nested Class Summary
 
Nested classes/interfaces inherited from class xtc.parser.Element
Element.Tag
 
Field Summary
 java.util.List<Binding> elements
          The list of bindings for the elements.
 Binding tail
          The optional binding for the tail.
 Type type
          The type of the proper list.
 
Constructor Summary
ProperListValue(Type type, Binding element)
          Create a new singleton list value.
ProperListValue(Type type, Binding element, Binding tail)
          Create a new list value.
ProperListValue(Type type, java.util.List<Binding> elements, Binding tail)
          Create a new proper list value.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 Element.Tag tag()
          Get this element's tag.
 
Methods inherited from class xtc.tree.Node
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, strip, toAnnotation, toList, toString, toToken, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public Type type
The type of the proper list.


elements

public java.util.List<Binding> elements
The list of bindings for the elements.


tail

public Binding tail
The optional binding for the tail.

Constructor Detail

ProperListValue

public ProperListValue(Type type,
                       Binding element)
Create a new singleton list value.

Parameters:
type - The type.
element - The binding for the single element.

ProperListValue

public ProperListValue(Type type,
                       Binding element,
                       Binding tail)
Create a new list value.

Parameters:
type - The type.
element - The binding for the single element.
tail - The binding for the tail.

ProperListValue

public ProperListValue(Type type,
                       java.util.List<Binding> elements,
                       Binding tail)
Create a new proper list value.

Parameters:
type - The type.
elements - The elements.
tail - The tail.
Method Detail

tag

public Element.Tag tag()
Description copied from class: Element
Get this element's tag.

Specified by:
tag in class Element
Returns:
The tag.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2012. All Rights Reserved.