org.duelengine.duel.codedom
Class CodeStatementCollection
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<CodeStatement>
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
| 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 |
CodeStatementCollection
public CodeStatementCollection(CodeObject owner)
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.