|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
aminePlatform.util.AmineList
Title : util.AmineList Class
Description : AmineList is a specialization of ArrayList and implements the List structure (as used in Prolog-like language). Elements of an AmineList can be any Amine Platform object : Integer, Double, String, Boolean, Identifier, Variable, AmineList, AmineSet, Term, Concept, CG, CS or any Java Object. An AmineList can be a descriptor (or contained in a descriptor) of a concept in a CG.
Subclasses : Term.
Implements : AmineObject and Matching interfaces
Copyright: Copyright (c) Adil KABBAJ, 2004-2009
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AmineList()
|
|
AmineList(java.util.Collection c)
|
|
AmineList(int i)
|
Method Summary | |
void |
clear()
Clear the content of the current list. |
java.lang.Object |
clone(BindingContext bindContext,
java.lang.Object bindInf)
This method is equivalent to copy(bindContext, bindInf). |
AmineList |
copy()
Unlike the inherited method clone(), this method returns a deep copy of the current AmineList (the elements are copied too) but it does not consider the values of variables that could exist in the current list. |
AmineList |
copy(BindingContext bindContext,
java.lang.Object bindInf)
Perform a deep copy of the current list (elements are themselves copied). |
boolean |
equal(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object is equal with the specified object obj. |
boolean |
equal(java.lang.Object obj)
Check that the current object is equal with the specified object obj. |
void |
finalize()
Finalize the current AmineList. |
java.lang.Object |
generalize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
java.lang.Object |
generalize(java.lang.Object obj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
void |
getVariables(java.util.ArrayList varsIdent)
Add, in the specified parameter varsIdent, all the variables that occur in the current AmineList. |
static boolean |
isAmineList(java.lang.Object obj)
Check if the specified Object obj is an AmineList. |
boolean |
isMember(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Test if the object obj is member of the current AmineList. if no element in the list is equal to obj and if the list terminates with a constructor and this later has a value (if the binding is considered), then a recursive test is done; check if obj is a member of the list which is the value of the constructor variable. |
boolean |
isMember(java.lang.Object obj)
Check if the specified obj is an element, comparison by content, of the current list. |
protected java.lang.Object |
match(byte matchOperation,
BindingContext bindContext,
java.lang.Object bindInf,
int indCurrElem1,
java.lang.Object obj,
java.lang.Object bindInfObj,
int indCurrElem2)
Test the matching of two AmineList starting from two specified ranges. |
java.lang.Object |
match(byte matchOperation,
BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. |
java.lang.Object |
match(byte matchOperation,
java.lang.Object obj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. |
java.lang.Object |
maximalJoin(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a maximal join of the current object with the specified object obj. |
java.lang.Object |
maximalJoin(java.lang.Object obj)
Perform a maximal join of the current object with the specified object obj. |
static AmineList |
parse(java.lang.String amineListInString)
Parse the textual formulation of an AmineList (parameter amineListInString) and return its internal representation (i.e. an AmineList object). |
static AmineList |
parse(java.lang.String amineListInString,
Lexicon lexicon)
Parse the textual formulation of an AmineList (parameter amineListInString) using the specified lexicon and return its internal representation (i.e. an AmineList object). |
boolean |
subsume(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object subsumes (is more general than) the specified object obj. |
boolean |
subsume(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.Object |
subsumeWithResult(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.Object |
subsumeWithResult(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
AmineSet |
toAmineSet()
Create an AmineSet copy of the current AmineList. |
java.lang.String |
toString()
Override toString() by calling toString(null, null, null) which formulates the content of the current list |
java.lang.String |
toString(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
This method returns the textual formulation of the current AmineList. |
java.lang.String |
toString(Lexicon lexicon)
Like toString() method, this method returns the textual formulation of the content of the current AmineList, using the specified lexicon. |
Term |
toTerm()
|
boolean |
unify(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Unify the current object with the specified object obj. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface aminePlatform.util.AmineObject |
clone |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public AmineList()
public AmineList(java.util.Collection c)
public AmineList(int i)
Method Detail |
public void finalize()
finalize
in interface AmineObject
public void clear()
clear
in interface AmineObject
public void getVariables(java.util.ArrayList varsIdent)
getVariables
in interface AmineObject
varsIdent
- : an ArrayList of Variable objects.public java.lang.String toString(Lexicon lexicon) throws ToStringException
toString
in interface ToString
lexicon
- The lexicon to use for the textual formulation. Lexicon is relevant
since an AmineList could contain references to CS present in the current ontology
and so the possibility to express the CS in different languages, via the associated identifiers.
ToStringException
- if an error occurs during the textual formulation of this AmineList object.public java.lang.String toString()
public java.lang.String toString(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
toString
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and the current AmineListlexicon
- The lexicon in use during the textual formulation of the current AmineList
ToStringException
- if an error occurs during the textualizationpublic static boolean isAmineList(java.lang.Object obj)
obj
- : an object
public AmineSet toAmineSet()
public Term toTerm()
public static AmineList parse(java.lang.String amineListInString, Lexicon lexicon) throws ParsingException
amineListInString
- a textual formulation of an AmineListlexicon
- The lexicon to use for the parsing
throws
- ParsingException if an error occurs during the parsing of
amineListInString.
ParsingException
public static AmineList parse(java.lang.String amineListInString) throws ParsingException
amineListInString
- a textual formulation of an AmineList
throws
- ParsingException if an error occurs during the parsing of
amineListInString.
ParsingException
public java.lang.Object clone(BindingContext bindContext, java.lang.Object bindInf)
clone
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current AmineList
public AmineList copy()
public AmineList copy(BindingContext bindContext, java.lang.Object bindInf)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current AmineList
public boolean isMember(java.lang.Object obj)
obj
- : an Object
public boolean isMember(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to
the current listobj
- The object to test the appartenance in the current listbindInfObj
- The binding information related to the binding context and to obj
public java.lang.Object match(byte matchOperation, java.lang.Object obj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to applyobj
- The object to match with the current object
public java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to apply.
Atually, these values are defined in AmineConstants interface and are: EQUAL,
UNIFY, SUBSUME, SUBSUME_WITH_RSLT, MAXIMAL_JOIN, and GENERALIZE.bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to match with the current objectbindInfObj
- The binding information for the parameter obj
protected java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, int indCurrElem1, java.lang.Object obj, java.lang.Object bindInfObj, int indCurrElem2)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to
the current listindCurrElem1
- The range of the element in the current list from which the test
should startobj
- The object to test the equality with the current listbindInfObj
- The binding information related to the binding context and to objindCurrElem2
- The range of the element in obj from which the test
should start
public boolean equal(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
equal
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check the equality with the current objectbindInfObj
- The binding information for the parameter obj
public boolean equal(java.lang.Object obj)
equal
in interface Matching
obj
- The object to check the equality with the current object
public boolean unify(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
unify
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to unify with the current objectbindInfObj
- The binding information for the parameter obj
public boolean subsume(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsume
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public boolean subsume(java.lang.Object obj)
subsume
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object subsumeWithResult(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsumeWithResult
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object subsumeWithResult(java.lang.Object obj)
subsumeWithResult
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object maximalJoin(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
maximalJoin
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to join with the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object maximalJoin(java.lang.Object obj)
maximalJoin
in interface Matching
obj
- The object to join with the current object
public java.lang.Object generalize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
generalize
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to generalize with the current objectbindInfObj
- The binding information for the parameter obj
public java.lang.Object generalize(java.lang.Object obj)
generalize
in interface Matching
obj
- The object to generalize with the current object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |