public class RulesList extends Observable implements IDecisionRuleList, XMLSerializable
IDecisionRule| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<IDecisionRule> |
list |
xmltag_CATEGORIES, xmltag_CATEGORY, xmltag_CATEGORYTHRESHOLD, xmltag_CLASS, xmltag_EXPLANATION, xmltag_ID, xmltag_METHOD, xmltag_METHODPARAMETER, xmltag_METHODS, xmltag_NAME, xmltag_RULE, xmltag_RULEEXAMPLE, xmltag_RULES, xmltag_TREEROOT| Constructor and Description |
|---|
RulesList() |
RulesList(String[] customRules)
Creates RulesList given the names of
IDecisionRule classes
Example :
RulesList(new String[] {
"toxTree.tree.rules.RuleSubstructure",
"toxTree.tree.rules.RuleAromatic"});
Rules are created from corresponding class names |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(IDecisionRule arg0)
Adds an object only if it is a rule
IDecisionRule
otherwise returns false |
void |
add(int arg0,
IDecisionRule arg1)
not implemented
|
boolean |
addAll(Collection arg0)
Adds all objects from the Collection
TODO verify if objects are
IDecisionRule |
boolean |
addAll(int arg0,
Collection arg1) |
void |
addRule(IDecisionRule rule)
adds a rule
IDecisionRule |
void |
clear() |
boolean |
contains(Object arg0) |
boolean |
containsAll(Collection arg0) |
boolean |
equals(Object arg0) |
void |
fromXML(Element xml) |
IDecisionRule |
get(int arg0) |
ArrayList |
getList() |
IDecisionRule |
getRule(int index)
returns a rule
IDecisionRule |
int |
hashCode() |
int |
indexOf(Object arg0) |
boolean |
isEmpty() |
Iterator |
iterator() |
int |
lastIndexOf(Object arg0) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int arg0) |
IDecisionRule |
remove(int arg0) |
boolean |
remove(Object arg0) |
boolean |
removeAll(Collection arg0) |
boolean |
retainAll(Collection arg0) |
IDecisionRule |
set(int arg0,
IDecisionRule arg1) |
void |
setList(ArrayList list) |
void |
setRules(String[] customRules)
Sets RulesList given the names of
IDecisionRule classes
Example :
setRules(new String[] {
"toxTree.tree.rules.RuleSubstructure",
"toxTree.tree.rules.RuleAromatic"});
Rules are created from corresponding class names |
int |
size() |
List |
subList(int arg0,
int arg1) |
Object[] |
toArray() |
Object[] |
toArray(Object[] arg0) |
Element |
toShallowXML(Document document) |
String |
toString() |
Element |
toXML(Document document) |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streamprotected ArrayList<IDecisionRule> list
public RulesList()
public RulesList(String[] customRules) throws DecisionMethodException
IDecisionRule classes
Example :
RulesList(new String[] {
"toxTree.tree.rules.RuleSubstructure",
"toxTree.tree.rules.RuleAromatic"});
Rules are created from corresponding class namescustomRules - DecisionMethodExceptionpublic void setRules(String[] customRules) throws DecisionMethodException
IDecisionRule classes
Example :
setRules(new String[] {
"toxTree.tree.rules.RuleSubstructure",
"toxTree.tree.rules.RuleAromatic"});
Rules are created from corresponding class namessetRules in interface IDecisionRuleListcustomRules - DecisionMethodExceptionpublic void addRule(IDecisionRule rule)
IDecisionRuleaddRule in interface IDecisionRuleListpublic IDecisionRule getRule(int index)
IDecisionRulegetRule in interface IDecisionRuleListpublic int size()
size in interface Collection<IDecisionRule>size in interface List<IDecisionRule>public boolean addAll(Collection arg0)
IDecisionRuleaddAll in interface Collection<IDecisionRule>addAll in interface List<IDecisionRule>public void add(int arg0,
IDecisionRule arg1)
add in interface List<IDecisionRule>public boolean add(IDecisionRule arg0)
IDecisionRule
otherwise returns falseadd in interface Collection<IDecisionRule>add in interface List<IDecisionRule>public boolean addAll(int arg0,
Collection arg1)
addAll in interface List<IDecisionRule>public void clear()
clear in interface Collection<IDecisionRule>clear in interface List<IDecisionRule>public boolean contains(Object arg0)
contains in interface Collection<IDecisionRule>contains in interface List<IDecisionRule>public boolean containsAll(Collection arg0)
containsAll in interface Collection<IDecisionRule>containsAll in interface List<IDecisionRule>public boolean equals(Object arg0)
equals in interface Collection<IDecisionRule>equals in interface List<IDecisionRule>equals in class Objectpublic IDecisionRule get(int arg0)
get in interface List<IDecisionRule>public int hashCode()
hashCode in interface Collection<IDecisionRule>hashCode in interface List<IDecisionRule>hashCode in class Objectpublic int indexOf(Object arg0)
indexOf in interface List<IDecisionRule>public boolean isEmpty()
isEmpty in interface Collection<IDecisionRule>isEmpty in interface List<IDecisionRule>public Iterator iterator()
iterator in interface Iterable<IDecisionRule>iterator in interface Collection<IDecisionRule>iterator in interface List<IDecisionRule>public int lastIndexOf(Object arg0)
lastIndexOf in interface List<IDecisionRule>public ListIterator listIterator()
listIterator in interface List<IDecisionRule>public ListIterator listIterator(int arg0)
listIterator in interface List<IDecisionRule>public IDecisionRule remove(int arg0)
remove in interface List<IDecisionRule>public boolean remove(Object arg0)
remove in interface Collection<IDecisionRule>remove in interface List<IDecisionRule>public boolean removeAll(Collection arg0)
removeAll in interface Collection<IDecisionRule>removeAll in interface List<IDecisionRule>public boolean retainAll(Collection arg0)
retainAll in interface Collection<IDecisionRule>retainAll in interface List<IDecisionRule>public IDecisionRule set(int arg0, IDecisionRule arg1)
set in interface List<IDecisionRule>public List subList(int arg0, int arg1)
subList in interface List<IDecisionRule>public Object[] toArray()
toArray in interface Collection<IDecisionRule>toArray in interface List<IDecisionRule>public Object[] toArray(Object[] arg0)
toArray in interface Collection<IDecisionRule>toArray in interface List<IDecisionRule>public void fromXML(Element xml) throws XMLDecisionMethodException
fromXML in interface XMLSerializableXMLDecisionMethodExceptionpublic Element toShallowXML(Document document) throws XMLDecisionMethodException
toShallowXML in interface XMLSerializableXMLDecisionMethodExceptionpublic Element toXML(Document document) throws XMLDecisionMethodException
toXML in interface XMLSerializableXMLDecisionMethodExceptionpublic ArrayList getList()
public void setList(ArrayList list)
Copyright © 2004–2018 Ideaconsult Ltd. All rights reserved.