org.duelengine.duel.codedom
Class CodeStatementCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<CodeStatement>
              extended by org.duelengine.duel.codedom.CodeStatementCollection
All Implemented Interfaces:
Serializable, Cloneable, Iterable<CodeStatement>, Collection<CodeStatement>, List<CodeStatement>, RandomAccess, IdentifierScope

public class CodeStatementCollection
extends ArrayList<CodeStatement>
implements IdentifierScope

Represents a sequence of statements

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CodeStatementCollection(CodeObject owner)
           
 
Method Summary
 boolean add(CodeExpression expression)
           
 boolean addAll(CodeStatement[] statements)
           
 boolean addAll(CodeStatementBlock block)
           
 boolean equals(Object arg)
           
 CodeStatement getFirstStatement()
           
 CodeStatement getLastStatement()
           
 CodeObject getOwner()
           
 int hashCode()
           
 boolean isLocalIdent(String ident)
          Determines if the client ident is declared in local scope
 Iterator<CodeStatement> iterator()
           
 String nextIdent(String prefix)
          Gets a new unique ident with the given prefix
 String uniqueIdent(String ident)
          Gets the corresponding unique server ident for the client ident
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

CodeStatementCollection

public CodeStatementCollection(CodeObject owner)
Method Detail

getOwner

public CodeObject getOwner()

addAll

public boolean addAll(CodeStatementBlock block)

addAll

public boolean addAll(CodeStatement[] statements)

add

public boolean add(CodeExpression expression)

getFirstStatement

public CodeStatement getFirstStatement()

getLastStatement

public CodeStatement getLastStatement()

isLocalIdent

public boolean isLocalIdent(String ident)
Description copied from interface: IdentifierScope
Determines if the client ident is declared in local scope

Specified by:
isLocalIdent in interface IdentifierScope
Returns:

uniqueIdent

public String uniqueIdent(String ident)
Description copied from interface: IdentifierScope
Gets the corresponding unique server ident for the client ident

Specified by:
uniqueIdent in interface IdentifierScope
Returns:

nextIdent

public String nextIdent(String prefix)
Description copied from interface: IdentifierScope
Gets a new unique ident with the given prefix

Specified by:
nextIdent in interface IdentifierScope
Returns:

iterator

public Iterator<CodeStatement> iterator()
Specified by:
iterator in interface Iterable<CodeStatement>
Specified by:
iterator in interface Collection<CodeStatement>
Specified by:
iterator in interface List<CodeStatement>
Overrides:
iterator in class AbstractList<CodeStatement>

equals

public boolean equals(Object arg)
Specified by:
equals in interface Collection<CodeStatement>
Specified by:
equals in interface List<CodeStatement>
Overrides:
equals in class AbstractList<CodeStatement>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<CodeStatement>
Specified by:
hashCode in interface List<CodeStatement>
Overrides:
hashCode in class AbstractList<CodeStatement>


Copyright © 2012. All Rights Reserved.