com.partnersoft.v3x.io.formats
Class ObjectDumpSortingGopher

java.lang.Object
  extended by com.partnersoft.v3x.io.formats.ObjectDumpSortingGopher
All Implemented Interfaces:
ArraySortingGopher

public class ObjectDumpSortingGopher
extends java.lang.Object
implements ArraySortingGopher

A specific gopher for sorting ObjectDump files.


Constructor Summary
ObjectDumpSortingGopher(ObjectDump dump)
           
 
Method Summary
 int compare(int index, java.lang.Object key)
          Compares the key of the item at the given index using the key given, based on the default ordering.
 int compare(int index, java.lang.Object key, java.util.Comparator comp)
          Compares the key of the item at the given index using the key and ordering given.
 int getSize()
          Returns the number of items in the array.
 java.lang.Object keyAt(int index)
          Gets the key object from the given index.
 void swap(int a, int b)
          Swaps the items at the two index positions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectDumpSortingGopher

public ObjectDumpSortingGopher(ObjectDump dump)
Method Detail

compare

public int compare(int index,
                   java.lang.Object key)
Description copied from interface: ArraySortingGopher
Compares the key of the item at the given index using the key given, based on the default ordering.

Specified by:
compare in interface ArraySortingGopher

compare

public int compare(int index,
                   java.lang.Object key,
                   java.util.Comparator comp)
Description copied from interface: ArraySortingGopher
Compares the key of the item at the given index using the key and ordering given.

Specified by:
compare in interface ArraySortingGopher

keyAt

public java.lang.Object keyAt(int index)
Description copied from interface: ArraySortingGopher
Gets the key object from the given index.

Specified by:
keyAt in interface ArraySortingGopher

swap

public void swap(int a,
                 int b)
Swaps the items at the two index positions.

Specified by:
swap in interface ArraySortingGopher

getSize

public int getSize()
Description copied from interface: ArraySortingGopher
Returns the number of items in the array.

Specified by:
getSize in interface ArraySortingGopher