AddressSpace library v1.0 beta

mmap
Class IntOrderedList

java.lang.Object
  |
  +--mmap.IntList
        |
        +--mmap.IntOrderedList

public class IntOrderedList
extends IntList

This list keeps integers in descending order.
This class doesn't use the btree algorithm, so it's much more performing if integers are inserted in ascending order.
Integer.MIN_VALUE is used as a placeholder when the list is empty.

Version:
1.0 June 05 2000
Author:
Dario Maggiorini (dario@dsi.unimi.it)

Inner classes inherited from class mmap.IntList
IntList.Entry
 
Fields inherited from class mmap.IntList
cursor, howMany, last, noNumbers, queue
 
Constructor Summary
IntOrderedList()
          Create a new empty list.
 
Method Summary
 void add(int value)
          Add an integer to the list.
 int first()
          Get the first (greatest) integer in the list.
 int last()
          Get the last (lowest) integer in the list.
 
Methods inherited from class mmap.IntList
clear, get, getSize, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntOrderedList

public IntOrderedList()
Create a new empty list.
Method Detail

add

public void add(int value)
Add an integer to the list.
Overrides:
add in class IntList
Parameters:
value - the integer to add.

first

public int first()
Get the first (greatest) integer in the list.
Such element is removed from the list.
Returns:
the greatest element.

last

public int last()
Get the last (lowest) integer in the list.
Such element is removed from the list.
Returns:
the lowest element.

Help is irrilevant
You will be assimilated!

v1.0 beta by Dario Maggiorini