ALBPM Process API (PAPI)

fuego.papi
Class Ordering

java.lang.Object
  extended byfuego.papi.Ordering
All Implemented Interfaces:
Serializable

public class Ordering
extends Object
implements Serializable

Ordering is a list of Ordering.Entry, which contains the information to sort the result of a Filter.

See Also:
Serialized Form

Nested Class Summary
 class Ordering.Entry
          Element with the information to sort an specific variable.
 
Constructor Summary
Ordering()
          Creates a new Ordering object.
 
Method Summary
 int add(Ordering.Entry entry)
          Appends the specified Ordering.Entry to sort.
 int add(String variableId, boolean ascending)
          Appends the specified variable Id to sort and if sorting in ascending order.
 int add(VarDefinition variable, boolean ascending)
          Appends the specified VarDefinition to sort and if sorting in ascending order.
 void clear()
          Removes all of the elements from this list.
 boolean contains(Ordering.Entry entry)
          Returns true if this list contains the specified Ordering.Entry.
 boolean contains(String variableId)
          Returns true if this list contains the specified variable Id.
 Ordering copy()
          Returns a copy of the current instance.
 Ordering.Entry getEntry(int index)
          Returns the element at the specified position in this list.
 int getEntryCount()
          Returns the number of elements in this list.
 int indexOf(Ordering.Entry entry)
          Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
 boolean isEmpty()
          Returns true if this list contains no elements.
 Ordering.Entry removeEntry(int index)
          Removes the element at the specified position in this list.
 boolean removeEntry(Ordering.Entry entry)
          Removes the first occurrence in this list of the specified element (optional operation).
 int update(String variableId, boolean ascending)
          Updates the ascending order for the specified variable.
 int update(VarDefinition variable, boolean ascending)
          Updates the ascending order for the specified variable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ordering

public Ordering()
Creates a new Ordering object.

Method Detail

isEmpty

public boolean isEmpty()
Returns true if this list contains no elements.

Returns:
true if this list contains no elements.

getEntry

public Ordering.Entry getEntry(int index)
Returns the element at the specified position in this list.

Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

getEntryCount

public int getEntryCount()
Returns the number of elements in this list.

Returns:
the number of elements in this list.

add

public int add(VarDefinition variable,
               boolean ascending)
Appends the specified VarDefinition to sort and if sorting in ascending order.

Parameters:
variable - VarDefinition to be appended to sort.
ascending - true if you sort in ascending order.
Returns:
the position of the element in the list.

add

public int add(String variableId,
               boolean ascending)
Appends the specified variable Id to sort and if sorting in ascending order. <\br>If the variable exists, the existing entry will be updated.

Parameters:
variableId - variable Id to be appended to sort.
ascending - true if you sort in ascending order.
Returns:
the position of the element in the list.

add

public int add(Ordering.Entry entry)
Appends the specified Ordering.Entry to sort. <\br>If the entry exists, the existing entry will be updated.

Parameters:
entry - element to be appended to sort.
Returns:
the position of the element in the list.

update

public int update(String variableId,
                  boolean ascending)
Updates the ascending order for the specified variable.

Parameters:
variableId - variable Id to update.
ascending - true if you sort in ascending order.
Returns:
the position of the element in the list or -1 if not exist.

update

public int update(VarDefinition variable,
                  boolean ascending)
Updates the ascending order for the specified variable.

Parameters:
variable - VarDefinition to update.
ascending - true if you sort in ascending order.
Returns:
the position of the element in the list or -1 if not exist.

clear

public void clear()
Removes all of the elements from this list.


contains

public boolean contains(String variableId)
Returns true if this list contains the specified variable Id.

Parameters:
variableId - variable Id whose presence in this list is to be tested.
Returns:
true if this list contains the specified variable Id.

contains

public boolean contains(Ordering.Entry entry)
Returns true if this list contains the specified Ordering.Entry.

Parameters:
entry - Ordering.Entry whose presence in this list is to be tested.
Returns:
true if this list contains the specified Ordering.Entry.

copy

public Ordering copy()
Returns a copy of the current instance.

Returns:
a copy of the current instance.

indexOf

public int indexOf(Ordering.Entry entry)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

Parameters:
entry - element to search for.
Returns:
the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.

removeEntry

public boolean removeEntry(Ordering.Entry entry)
Removes the first occurrence in this list of the specified element (optional operation). If this list does not contain the element, it is unchanged.

Parameters:
entry - element to be removed from this list, if present.
Returns:
true if this list contained the specified element.

removeEntry

public Ordering.Entry removeEntry(int index)
Removes the element at the specified position in this list. Returns the element that was removed from the list.

Parameters:
index - the index of the element to removed.
Returns:
the element previously at the specified position.

ALBPM Process API (PAPI)

© Copyright 1996/2005 Fuego Inc. All Rights Reserved