com.basistech.rlp
Class RLPIntegerPair.List

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<RLPIntegerPair>
          extended by com.basistech.rlp.RLPIntegerPair.List
All Implemented Interfaces:
Iterable<RLPIntegerPair>, Collection<RLPIntegerPair>, List<RLPIntegerPair>
Enclosing class:
RLPIntegerPair

public static class RLPIntegerPair.List
extends AbstractList<RLPIntegerPair>

Iteration support for an IntBuffer viewed as a List of RLPIntegerPair objects.


Constructor Summary
RLPIntegerPair.List(IntBuffer b)
          Construct given the data buffer.
 
Method Summary
 RLPIntegerPair get(int index)
          Retrieves an item from the List.
 int size()
          Number of pairs in the List.
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

RLPIntegerPair.List

public RLPIntegerPair.List(IntBuffer b)
Construct given the data buffer.

Parameters:
b - java.nio.IntBuffer containing the data.
Method Detail

size

public int size()
Number of pairs in the List.

Specified by:
size in interface Collection<RLPIntegerPair>
Specified by:
size in interface List<RLPIntegerPair>
Specified by:
size in class AbstractCollection<RLPIntegerPair>
Returns:
Number of elements in the list.

get

public RLPIntegerPair get(int index)
                   throws IndexOutOfBoundsException
Retrieves an item from the List.

Specified by:
get in interface List<RLPIntegerPair>
Specified by:
get in class AbstractList<RLPIntegerPair>
Parameters:
index - Index of the element to return.
Returns:
An RLPIntegerPair.
Throws:
IndexOutOfBoundsException - if the index is < 0 or greater than the size.


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.