uk.ac.bbk.dcs.automed.qproc.functions
Class ModifiedArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
uk.ac.bbk.dcs.automed.qproc.functions.ModifiedArray
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
public class ModifiedArray
- extends java.util.ArrayList
- See Also:
- Serialized Form
| Fields inherited from class java.util.AbstractList |
modCount |
| 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 |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
ModifiedArray
public ModifiedArray(Cell n)
throws TypeException,
QProcException
- Throws:
TypeException
QProcException
ModifiedArray
public ModifiedArray()
returnGraph
public Cell returnGraph(java.lang.String colType)
throws QProcException
- Parameters:
colType - one of "List", "Set", or "Bag"
- Returns:
- the root of the ASG representing the collection in the
ModifiedArray
- Throws:
QProcException
at
public Cell at(int i)
swap
public void swap(int i,
int j)
removeDuplicates
public ModifiedArray removeDuplicates()
throws QProcException
- Throws:
QProcException
sort
public void sort()
throws QProcException
- Throws:
QProcException
monus
public ModifiedArray monus(ModifiedArray subCol)
throws QProcException
- Throws:
QProcException
grouplist
public ModifiedArray grouplist(java.lang.String colType)
throws QProcException
- Throws:
QProcException
sorted
public int sorted()
throws QProcException
- Returns:
- 1 if sorted without duplicates, 0 if sorted with duplicates, -1
if not sorted without duplicates, -2 if not sorted with
duplicates.
- Throws:
QProcException
ensureSorted
public boolean ensureSorted()
throws QProcException
- Returns:
- true if sorting was performed
- Throws:
QProcException
ensureDupFree
public boolean ensureDupFree()
throws QProcException
- Returns:
- true if duplicate removal was performed
- Throws:
QProcException
ensureSortedDupFree
public boolean ensureSortedDupFree()
throws QProcException
- Returns:
- true if sorting or duplicate removal was performed (or both)
- Throws:
QProcException