public abstract class ATermImpl extends ATermVisitableImpl implements ATerm, shared.SharedObjectWithID
| Modifier and Type | Field and Description |
|---|---|
protected PureFactory |
factory |
| Modifier | Constructor and Description |
|---|---|
protected |
ATermImpl(PureFactory factory) |
protected |
ATermImpl(PureFactory factory,
ATermList annos) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Checks equality of this term against any java object.
|
ATerm |
getAnnotation(ATerm label)
Gets a annotation associated with specific label from this term.
|
ATermList |
getAnnotations()
Gets all annotations of this term.
|
ATermFactory |
getFactory()
Retrieves the factory responsible for creating this ATerm.
|
int |
getNrSubTerms() |
protected PureFactory |
getPureFactory() |
ATerm |
getSubTerm(int index) |
int |
getUniqueIdentifier() |
boolean |
hasAnnotations() |
int |
hashCode()
Gets a hashcode value of this term.
|
protected void |
init(int hashCode,
ATermList annos) |
protected void |
internSetAnnotations(ATermList annos) |
boolean |
isEqual(ATerm term)
Checks equality of this term against another term.
|
ATerm |
make(List<Object> list)
Create a new term based on this term as a pattern and a list of arguments.
|
List<Object> |
match(ATerm pattern)
Matches this term against a term pattern.
|
List<Object> |
match(String pattern)
Matches this term against a String pattern.
|
ATerm |
removeAnnotation(ATerm label)
Removes a specific annotation from this term.
|
ATerm |
removeAnnotations()
Removes all annotations of this term.
|
ATerm |
setAnnotation(ATerm label,
ATerm anno)
Sets annotation of this term with given label.
|
protected void |
setHashCode(int hashcode) |
ATerm |
setSubTerm(int index,
ATerm t) |
void |
setUniqueIdentifier(int uniqueId) |
String |
toString()
Gets a string representation of this term.
|
void |
writeToSharedTextFile(OutputStream stream)
Write a term to a shared text file/stream.
|
void |
writeToTextFile(aterm.pure.ATermWriter writer) |
void |
writeToTextFile(OutputStream stream)
Write a term to a text file/stream.
|
getChildAt, getChildCount, setChildAtclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetType, setAnnotationsprotected PureFactory factory
protected ATermImpl(PureFactory factory)
factory - protected ATermImpl(PureFactory factory, ATermList annos)
public final int hashCode()
ATermprotected void setHashCode(int hashcode)
protected void internSetAnnotations(ATermList annos)
protected void init(int hashCode,
ATermList annos)
hashCode - annos - public ATermFactory getFactory()
ATermgetFactory in interface ATermprotected PureFactory getPureFactory()
public boolean hasAnnotations()
hasAnnotations in interface ATermpublic ATerm setAnnotation(ATerm label, ATerm anno)
ATermsetAnnotation in interface ATermlabel - the label of the annotation.anno - the annotation itself.ATerm.getAnnotation(aterm.ATerm)public ATerm removeAnnotation(ATerm label)
ATermremoveAnnotation in interface ATermlabel - the label of the annotation to be removed.ATerm.setAnnotation(aterm.ATerm, aterm.ATerm)public ATerm getAnnotation(ATerm label)
ATermgetAnnotation in interface ATermlabel - the label of the desired annotation.ATerm.setAnnotation(aterm.ATerm, aterm.ATerm)public ATerm removeAnnotations()
ATermremoveAnnotations in interface ATermATerm.setAnnotations(aterm.ATermList)public ATermList getAnnotations()
ATermgetAnnotations in interface ATermATerm.setAnnotations(aterm.ATermList)public List<Object> match(String pattern)
ATermmatch in interface ATermpattern - the string pattern to match this term against.ATerm.match(ATerm)public List<Object> match(ATerm pattern)
ATermpublic boolean isEqual(ATerm term)
ATermATerm.equals(java.lang.Object) method.isEqual in interface ATermterm - the term to check for equality.ATerm.equals(Object)public boolean equals(Object obj)
ATermequals in interface ATermequals in class Objectobj - the object to check for equality.ATerm.isEqual(aterm.ATerm)public ATerm make(List<Object> list)
ATermpublic void writeToTextFile(aterm.pure.ATermWriter writer)
throws IOException
IOExceptionpublic void writeToSharedTextFile(OutputStream stream) throws IOException
ATermwriteToSharedTextFile in interface ATermstream - the stream to write this term toIOExceptionpublic void writeToTextFile(OutputStream stream) throws IOException
ATermwriteToTextFile in interface ATermstream - the stream to write toIOExceptionpublic String toString()
ATermpublic int getNrSubTerms()
getNrSubTerms in class ATermVisitableImplpublic ATerm getSubTerm(int index)
getSubTerm in class ATermVisitableImplpublic ATerm setSubTerm(int index, ATerm t)
setSubTerm in class ATermVisitableImplpublic int getUniqueIdentifier()
getUniqueIdentifier in interface IdentifiablegetUniqueIdentifier in interface shared.SharedObjectWithIDpublic void setUniqueIdentifier(int uniqueId)
setUniqueIdentifier in interface shared.SharedObjectWithIDCopyright © 2012 CWI. All Rights Reserved.