com.cc.framework.common
Class TupleArray

java.lang.Object
  extended bycom.cc.framework.common.TupleArray
All Implemented Interfaces:
java.io.Serializable

public class TupleArray
extends java.lang.Object
implements java.io.Serializable

Array for managing tuples

Since:
1.0
Version:
$Revision: 1.12 $
Author:
Harald Schulz
See Also:
Tuple, Serialized Form

Field Summary
private static long serialVersionUID
          Serial Version UID
private  java.util.ArrayList tuples
          The buffer into which the elements are stored.
 
Constructor Summary
TupleArray()
          Constructs an empty list
 
Method Summary
 java.util.Collection a()
          Returns all A-Values form the tuple list.
 java.lang.Object a(int index)
          Returns the A-Value form the tuple at the specified position in this list.
 void add(java.lang.Object a, java.lang.Object b)
          Creates a new Tuple and adds it to the list
 void add(Tuple tuple)
          Appends the specified tuple to this list.
 java.util.Collection b()
          Returns all B-Values form the tuple list.
 java.lang.Object b(int index)
          Returns the B-Value form the tuple at the specified position in this list.
 void clear()
          Removes all of the elements from this list.
 Tuple get(int index)
          Returns the element at the specified position in this list.
 boolean isEmpty()
          Tests if this list has no elements.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

tuples

private java.util.ArrayList tuples
The buffer into which the elements are stored.

Constructor Detail

TupleArray

public TupleArray()
Constructs an empty list

Method Detail

add

public void add(Tuple tuple)
Appends the specified tuple to this list.

Parameters:
tuple - Tuple to be appended to this list.

add

public void add(java.lang.Object a,
                java.lang.Object b)
Creates a new Tuple and adds it to the list

Parameters:
a - Object1
b - Object2

get

public Tuple get(int index)
Returns the element at the specified position in this list.

Parameters:
index - Index of element to return.
Returns:
Tuple The element at the specified position in this list.

a

public java.lang.Object a(int index)
Returns the A-Value form the tuple at the specified position in this list.

Parameters:
index - Index of element to return.
Returns:
Object

a

public java.util.Collection a()
Returns all A-Values form the tuple list.

Returns:
Collection of A-Values

b

public java.lang.Object b(int index)
Returns the B-Value form the tuple at the specified position in this list.

Parameters:
index - Index of element to return.
Returns:
Object

b

public java.util.Collection b()
Returns all B-Values form the tuple list.

Returns:
Collection of B-Values

isEmpty

public boolean isEmpty()
Tests if this list has no elements.

Returns:
true if this list has no elements; false otherwise.

size

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

Returns:
The number of elements in this list.

clear

public void clear()
Removes all of the elements from this list. The list will be empty after this call returns.



Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.