public class ATermListImpl extends ATermImpl implements ATermList
| Modifier | Constructor and Description |
|---|---|
protected |
ATermListImpl(PureFactory factory) |
protected |
ATermListImpl(PureFactory factory,
ATermList annos,
ATerm first,
ATermList next) |
| Modifier and Type | Method and Description |
|---|---|
Visitable |
accept(Visitor v) |
ATermList |
append(ATerm el)
Appends an element to this list.
|
ATermList |
concat(ATermList rhs)
Concatenates a list to this list.
|
ATerm |
dictGet(ATerm key)
Retrieves an element from a dictionary list.
|
ATermList |
dictPut(ATerm key,
ATerm value)
Sets the value for an element in a dictionary list.
|
ATermList |
dictRemove(ATerm key)
Removes an element from a dictionary list.
|
shared.SharedObject |
duplicate() |
ATerm |
elementAt(int index)
Gets the element at a specific index of this list.
|
boolean |
equivalent(shared.SharedObject obj) |
protected int |
findEmptyHashCode() |
ATermList |
getEmpty()
Gets the empty list associated to this list.
|
ATerm |
getFirst()
Gets the first element of this list.
|
ATerm |
getLast()
Gets the last element of this list.
|
int |
getLength()
Gets the length (number of elements) of this list.
|
ATermList |
getNext()
Gets the tail (all but the first element) of this list.
|
int |
getNrSubTerms() |
ATermList |
getPrefix()
Gets the prefix (all but the last element) of this list.
|
ATermList |
getSlice(int start,
int end)
Gets a portion (slice) of this list.
|
ATerm |
getSubTerm(int index) |
int |
getType()
Gets the type of this term.
|
int |
indexOf(ATerm el,
int start)
Gets the index of the first occurance of a term in this list.
|
protected void |
init(int hashCode,
ATermList annos,
ATerm first,
ATermList next) |
protected void |
initHashCode(ATermList annos,
ATerm first,
ATermList next) |
ATermList |
insert(ATerm el)
Inserts a term in front of this list.
|
ATermList |
insertAt(ATerm el,
int i)
Inserts an element at a specific position in this list.
|
boolean |
isEmpty()
Checks if this list is the empty list.
|
int |
lastIndexOf(ATerm el,
int start)
Gets the last occurance of a term in this list.
|
protected ATermList |
make(ATerm head,
ATermList tail) |
protected ATermList |
make(ATerm head,
ATermList tail,
ATermList annos) |
ATerm |
make(List<Object> args)
Create a new term based on this term as a pattern and a list of arguments.
|
protected boolean |
match(ATerm pattern,
List<Object> list) |
ATermList |
remove(ATerm el)
Removes one occurance of an element from this list.
|
ATermList |
removeAll(ATerm el)
Removes all occurances of an element in this list.
|
ATermList |
removeElementAt(int index)
Removes the element at a specific index in this list.
|
ATermList |
replace(ATerm el,
int i)
Replaces a specific term in this list with another.
|
ATermList |
reverse()
Reverses the elements of this list.
|
ATerm |
setAnnotations(ATermList annos)
Sets all annotations of this term.
|
ATerm |
setSubTerm(int index,
ATerm t) |
equals, getAnnotation, getAnnotations, getFactory, getPureFactory, getUniqueIdentifier, hasAnnotations, hashCode, init, internSetAnnotations, isEqual, match, match, removeAnnotation, removeAnnotations, setAnnotation, setHashCode, setUniqueIdentifier, toString, writeToSharedTextFile, writeToTextFile, writeToTextFilegetChildAt, getChildCount, setChildAtclone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, getAnnotation, getAnnotations, getFactory, hasAnnotations, hashCode, isEqual, match, match, removeAnnotation, removeAnnotations, setAnnotation, toString, writeToSharedTextFile, writeToTextFilegetUniqueIdentifierprotected ATermListImpl(PureFactory factory)
protected ATermListImpl(PureFactory factory, ATermList annos, ATerm first, ATermList next)
public int getType()
ATermgetType in interface ATermATerm.INT,
ATerm.REAL,
ATerm.APPL,
ATerm.LIST,
ATerm.PLACEHOLDER,
ATerm.BLOB,
ATerm.AFUN,
ATerm.LONGprotected void init(int hashCode,
ATermList annos,
ATerm first,
ATermList next)
hashCode - annos - first - next - protected void initHashCode(ATermList annos, ATerm first, ATermList next)
annos - first - next - public shared.SharedObject duplicate()
duplicate in interface shared.SharedObjectpublic boolean equivalent(shared.SharedObject obj)
equivalent in interface shared.SharedObjectpublic ATermList insert(ATerm el)
ATermListpublic ATermList getEmpty()
ATermListpublic ATerm setAnnotations(ATermList annos)
ATermsetAnnotations in interface ATermannos - the annotations to set.ATerm.getAnnotations()public ATerm make(List<Object> args)
ATermpublic boolean isEmpty()
ATermListpublic int getLength()
ATermListpublic ATerm getFirst()
ATermListpublic ATermList getNext()
ATermListpublic ATerm getLast()
ATermListpublic int indexOf(ATerm el, int start)
ATermListindexOf in interface ATermListel - the element to look for.start - the starting position of the lookup. Negative start
implies searching backwards from the tail of the list.ATermList.lastIndexOf(aterm.ATerm, int)public int lastIndexOf(ATerm el, int start)
ATermListlastIndexOf in interface ATermListel - the element to look for.start - the starting position of the lookup.ATermList.indexOf(aterm.ATerm, int)public ATermList concat(ATermList rhs)
ATermListpublic ATermList append(ATerm el)
ATermListpublic ATerm elementAt(int index)
ATermListpublic ATermList remove(ATerm el)
ATermListpublic ATermList removeElementAt(int index)
ATermListremoveElementAt in interface ATermListindex - the index of the element to be removed.public ATermList removeAll(ATerm el)
ATermListpublic ATermList insertAt(ATerm el, int i)
ATermListpublic ATermList getPrefix()
ATermListpublic ATermList getSlice(int start, int end)
ATermListpublic ATermList replace(ATerm el, int i)
ATermListpublic ATermList reverse()
ATermListpublic ATerm dictGet(ATerm key)
ATermListpublic ATermList dictPut(ATerm key, ATerm value)
ATermListpublic ATermList dictRemove(ATerm key)
ATermListdictRemove in interface ATermListkey - the key to removepublic Visitable accept(Visitor v) throws jjtraveler.VisitFailure
jjtraveler.VisitFailurepublic int getNrSubTerms()
getNrSubTerms in class ATermImplpublic ATerm getSubTerm(int index)
getSubTerm in class ATermImplpublic ATerm setSubTerm(int index, ATerm t)
setSubTerm in class ATermImplprotected int findEmptyHashCode()
Copyright © 2012 CWI. All Rights Reserved.