com.amazon.carbonado.cursor
Class ArraySortBuffer<S>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<S>
com.amazon.carbonado.cursor.ArraySortBuffer<S>
- All Implemented Interfaces:
- SortBuffer<S>, Serializable, Cloneable, Iterable<S>, Collection<S>, List<S>, RandomAccess
public class ArraySortBuffer<S>
- extends ArrayList<S>
- implements SortBuffer<S>
Sort buffer implementation backed by an ArrayList.
- Author:
- Brian S O'Neill
- See Also:
SortedCursor,
Serialized Form
|
Method Summary |
void |
close()
Clear and close buffer. |
void |
prepare(Comparator<S> comparator)
Clears buffer and assigns a comparator for sorting. |
void |
sort()
Finish sorting buffer. |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
ArraySortBuffer
public ArraySortBuffer()
ArraySortBuffer
public ArraySortBuffer(int initialCapacity)
prepare
public void prepare(Comparator<S> comparator)
- Description copied from interface:
SortBuffer
- Clears buffer and assigns a comparator for sorting.
- Specified by:
prepare in interface SortBuffer<S>
sort
public void sort()
- Description copied from interface:
SortBuffer
- Finish sorting buffer.
- Specified by:
sort in interface SortBuffer<S>
close
public void close()
- Description copied from interface:
SortBuffer
- Clear and close buffer.
- Specified by:
close in interface SortBuffer<S>
Copyright © 2006-2008 Amazon Technologies, Inc.. All Rights Reserved.