com.ebay.erl.mobius.core.sort
Class Sorter

java.lang.Object
  extended by com.ebay.erl.mobius.core.sort.Sorter
All Implemented Interfaces:
java.io.Serializable

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

Specifies the sorting columns and the sorting ordering in a total sort job.

This product is licensed under the Apache License, Version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0. This product contains portions derived from Apache hadoop which is licensed under the Apache License, Version 2.0, available at http://hadoop.apache.org. © 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan

See Also:
Serialized Form

Nested Class Summary
static class Sorter.Ordering
          Ordering type.
 
Constructor Summary
Sorter(java.lang.String sortColumn, Sorter.Ordering ordering)
          Create a sorter for a sort job.
Sorter(java.lang.String columnName, Sorter.Ordering ordering, boolean forceSortNumerically)
          Create a sorter for a sort job.
 
Method Summary
 boolean forceSortNumerically()
           
 java.lang.String getColumn()
           
 Sorter.Ordering getOrdering()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sorter

public Sorter(java.lang.String columnName,
              Sorter.Ordering ordering,
              boolean forceSortNumerically)
Create a sorter for a sort job.

Sorter is used to specify the ordering or the records in a dataset.

Parameters:
columnName - column to be sorted
ordering - ascending or descending order.
forceSortNumerically - true to force compare the value of the given columnName numerically, false to use the native comparing of the original value type.

Sorter

public Sorter(java.lang.String sortColumn,
              Sorter.Ordering ordering)
Create a sorter for a sort job.

Sorter is used to specify the ordering or the records in a dataset.

Parameters:
columnName - column to be sorted
ordering - ascending or descending by the nature ordering of the sortColumn.
Method Detail

forceSortNumerically

public boolean forceSortNumerically()

getOrdering

public Sorter.Ordering getOrdering()

getColumn

public java.lang.String getColumn()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object