org.onemind.commons.java.datastructure
Class LongList

java.lang.Object
  extended byorg.onemind.commons.java.datastructure.LongList

public class LongList
extends java.lang.Object

Represents a list of long

Version:
$Id: LongList.java,v 1.2 2004/08/26 12:33:16 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)

Constructor Summary
LongList()
          {@inheritDoc}
LongList(int capacity)
          {@inheritDoc}
 
Method Summary
 void add(long l)
          Add a long to the list
 void add(long l, int i)
          Add a long at index i
 long first()
          Return the first long in the list
 long get(int i)
          Get the long on index i in the list
 long last()
          Return the last long in the list
 long remove(int i)
          Remove the long at index i
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongList

public LongList()
{@inheritDoc}


LongList

public LongList(int capacity)
{@inheritDoc}

Parameters:
capacity - initial capacity
Method Detail

add

public void add(long l)
Add a long to the list

Parameters:
l - the long

get

public long get(int i)
Get the long on index i in the list

Parameters:
i - the index
Returns:
the long

add

public void add(long l,
                int i)
Add a long at index i

Parameters:
l - the long
i - the index

remove

public long remove(int i)
Remove the long at index i

Parameters:
i - the index
Returns:
the long at index i

first

public long first()
Return the first long in the list

Returns:
the first long

last

public long last()
Return the last long in the list

Returns:
the last long


Copyright © 2004-2006 . All Rights Reserved.