[all packages] [package net.sf.pizzacompiler.contrib] [class hierarchy] [index]

public class net.sf.pizzacompiler.contrib.SortedVector<A>

(source file: /home/enno/source/tmp/pizza/main/src/net/sf/pizzacompiler/contrib/SortedVector.pizza)
java.lang.Object
   |
   +----net.sf.pizzacompiler.util.Vector<A>
           |
           +----net.sf.pizzacompiler.contrib.SortedVector<A>

The pure class interface.
public class SortedVector<A>
  extends Vector<A>
A sorted vector. All elements are inserted at the correct position.

See also:
net.sf.pizzacompiler.util.Vector, SortedStringVector

Constuctor Index

O SortedVector((int) -> A[], A, (A, A) -> int)
O SortedVector(int, (int) -> A[], A, (A, A) -> int)
O SortedVector(int, int, (int) -> A[], A, (A, A) -> int)

Methods

O insert(A)
O setDuplicates(boolean)
Sets if duplicates are allowed in this Vector. Default is true.
O sortVector(Vector<A>)
TODO: This uses sorting by insertion...

Constructors

O SortedVector
public SortedVector(int initialCapacity,
                    int capacityIncrement,
                    (int) -> A[] allocator,
                    A defaultElem,
                    (A, A) -> int compare);

Parameters:
compare - returns < 0 if A1 0 if A1>A2
See also:
Vector(int, int, (int) -> A[], A, (A, A) -> int)

O SortedVector

public SortedVector(int initialCapacity,
                    (int) -> A[] allocator,
                    A defaultElem,
                    (A, A) -> int compare);

Parameters:
compare - returns < 0 if A1 0 if A1>A2
See also:
Vector(int, (int) -> A[], A, (A, A) -> int)

O SortedVector

public SortedVector((int) -> A[] allocator,
                    A defaultElem,
                    (A, A) -> int compare);

Parameters:
compare - returns < 0 if A1 0 if A1>A2
See also:
Vector((int) -> A[], A, (A, A) -> int)

Methods

O setDuplicates
public void setDuplicates(boolean duplicates);
Sets if duplicates are allowed in this Vector. Default is true.

O insert

public synchronized void insert(A obj);

O sortVector

public void sortVector(Vector<A> v);
TODO: This uses sorting by insertion...


[all packages] [package net.sf.pizzacompiler.contrib] [class hierarchy] [index]
net.sf.pizzacompiler.contrib.SortedVector.html