info.bliki.wiki.template.expr.ast
Class FunctionNode

java.lang.Object
  extended by info.bliki.wiki.template.expr.ast.ASTNode
      extended by info.bliki.wiki.template.expr.ast.FunctionNode
All Implemented Interfaces:
java.lang.Iterable<ASTNode>, java.util.Collection<ASTNode>, java.util.List<ASTNode>

public class FunctionNode
extends ASTNode
implements java.util.List<ASTNode>

A list of ASTNode's which represents a parsed function.
The head of the function (i.e. Ceil, Floor, Trunc, Plus, Times,...) is stored in the 0-th index of the list.
The arguments of the function are stored in the 1...n-th index of the list.


Field Summary
 
Fields inherited from class info.bliki.wiki.template.expr.ast.ASTNode
fStringValue
 
Constructor Summary
FunctionNode(ASTNode head)
           
FunctionNode(SymbolNode head, ASTNode arg0)
           
FunctionNode(SymbolNode head, ASTNode arg0, ASTNode arg1)
           
 
Method Summary
 boolean add(ASTNode node)
          Appends the node to the end of this list.
 void add(int index, ASTNode element)
           
 boolean addAll(java.util.Collection<? extends ASTNode> c)
           
 boolean addAll(int index, java.util.Collection<? extends ASTNode> c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection<?> c)
           
 void ensureCapacity(int minCapacity)
           
 boolean equals(java.lang.Object o)
           
 ASTNode get(int index)
          Returns the node at the specified position in this list.
 int hashCode()
           
 int indexOf(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator<ASTNode> iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator<ASTNode> listIterator()
           
 java.util.ListIterator<ASTNode> listIterator(int index)
           
 ASTNode remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 ASTNode set(int index, ASTNode element)
           
 int size()
           
 java.util.List<ASTNode> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 java.lang.String toString()
           
 void trimToSize()
           
 
Methods inherited from class info.bliki.wiki.template.expr.ast.ASTNode
dependsOn, derivative, getString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionNode

public FunctionNode(ASTNode head)

FunctionNode

public FunctionNode(SymbolNode head,
                    ASTNode arg0)

FunctionNode

public FunctionNode(SymbolNode head,
                    ASTNode arg0,
                    ASTNode arg1)
Method Detail

add

public void add(int index,
                ASTNode element)
Specified by:
add in interface java.util.List<ASTNode>

add

public boolean add(ASTNode node)
Appends the node to the end of this list.

Specified by:
add in interface java.util.Collection<ASTNode>
Specified by:
add in interface java.util.List<ASTNode>
Parameters:
node - element to be appended to this list
Returns:
true (as specified by Collection.add(E))

addAll

public boolean addAll(java.util.Collection<? extends ASTNode> c)
Specified by:
addAll in interface java.util.Collection<ASTNode>
Specified by:
addAll in interface java.util.List<ASTNode>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends ASTNode> c)
Specified by:
addAll in interface java.util.List<ASTNode>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<ASTNode>
Specified by:
clear in interface java.util.List<ASTNode>

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection<ASTNode>
Specified by:
contains in interface java.util.List<ASTNode>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<ASTNode>
Specified by:
containsAll in interface java.util.List<ASTNode>

ensureCapacity

public void ensureCapacity(int minCapacity)

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection<ASTNode>
Specified by:
equals in interface java.util.List<ASTNode>
Specified by:
equals in class ASTNode

get

public ASTNode get(int index)
Returns the node at the specified position in this list.

Specified by:
get in interface java.util.List<ASTNode>
Parameters:
index - index of the ASTNode to return
Returns:
the ASTNode at the specified position in this list
Throws:
java.lang.IndexOutOfBoundsException

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Collection<ASTNode>
Specified by:
hashCode in interface java.util.List<ASTNode>
Overrides:
hashCode in class ASTNode

indexOf

public int indexOf(java.lang.Object o)
Specified by:
indexOf in interface java.util.List<ASTNode>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<ASTNode>
Specified by:
isEmpty in interface java.util.List<ASTNode>

iterator

public java.util.Iterator<ASTNode> iterator()
Specified by:
iterator in interface java.lang.Iterable<ASTNode>
Specified by:
iterator in interface java.util.Collection<ASTNode>
Specified by:
iterator in interface java.util.List<ASTNode>

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List<ASTNode>

listIterator

public java.util.ListIterator<ASTNode> listIterator()
Specified by:
listIterator in interface java.util.List<ASTNode>

listIterator

public java.util.ListIterator<ASTNode> listIterator(int index)
Specified by:
listIterator in interface java.util.List<ASTNode>

remove

public ASTNode remove(int index)
Specified by:
remove in interface java.util.List<ASTNode>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<ASTNode>
Specified by:
remove in interface java.util.List<ASTNode>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<ASTNode>
Specified by:
removeAll in interface java.util.List<ASTNode>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<ASTNode>
Specified by:
retainAll in interface java.util.List<ASTNode>

set

public ASTNode set(int index,
                   ASTNode element)
Specified by:
set in interface java.util.List<ASTNode>

size

public int size()
Specified by:
size in interface java.util.Collection<ASTNode>
Specified by:
size in interface java.util.List<ASTNode>

subList

public java.util.List<ASTNode> subList(int fromIndex,
                                       int toIndex)
Specified by:
subList in interface java.util.List<ASTNode>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<ASTNode>
Specified by:
toArray in interface java.util.List<ASTNode>

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Specified by:
toArray in interface java.util.Collection<ASTNode>
Specified by:
toArray in interface java.util.List<ASTNode>

toString

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

trimToSize

public void trimToSize()


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.