de.hpi.fgis.dude.util.sorting.sorter
Interface DuDeObjectSorter

All Known Implementing Classes:
AbstractDuDeObjectSorter, InMemorySorter, TwoPhaseMultiWayMergeSorter

public interface DuDeObjectSorter

The interface DuDeObjectSorter provides the method signatures for sorting a collection of DuDeObjects.

Author:
Matthias Pohl

Method Summary
 void add(DuDeObject object)
          Adds a DuDeObject to the collection that will be sorted.
 void addAll(Iterable<DuDeObject> objects)
          Adds the passed several DuDeObjects to this DuDeObjectSorter.
 void clear()
          Clears the already added data.
 DuDeStorage<DuDeObject> getSortedCollection()
          Returns the sorted data.
 void setSortingKey(SortingKey sortingKey)
          Sets a new SortingKey.
 

Method Detail

add

void add(DuDeObject object)
Adds a DuDeObject to the collection that will be sorted.

Parameters:
object - The DuDeObject.

addAll

void addAll(Iterable<DuDeObject> objects)
Adds the passed several DuDeObjects to this DuDeObjectSorter.

Parameters:
objects - The DuDeObjects.

setSortingKey

void setSortingKey(SortingKey sortingKey)
Sets a new SortingKey.

Parameters:
sortingKey - The new SortingKey.
Throws:
NullPointerException - If null was passed instead of a SortingKey.

clear

void clear()
Clears the already added data.


getSortedCollection

DuDeStorage<DuDeObject> getSortedCollection()
                                            throws IOException
Returns the sorted data.

Returns:
A sorted collection of the data.
Throws:
IOException - If an error occurs while sorting the data file-based.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.