eu.semaine.util
Class FuzzySort.FuzzySortable

java.lang.Object
  extended by eu.semaine.util.FuzzySort.FuzzySortable
Enclosing class:
FuzzySort

public static class FuzzySort.FuzzySortable
extends java.lang.Object


Constructor Summary
FuzzySort.FuzzySortable(java.lang.Object payload)
          Create a fuzzy sortable which is neither initial nor final.
FuzzySort.FuzzySortable(java.lang.Object payload, boolean isInitial, boolean isFinal)
          Create a fuzzy sortable and set its initial or final state.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getPayload()
           
 int hashCode()
           
 boolean isFinal()
          Indicate whether this sortable wants to be in final position.
 boolean isInitial()
          Indicate whether this sortable wants to be in initial position.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FuzzySort.FuzzySortable

public FuzzySort.FuzzySortable(java.lang.Object payload)
Create a fuzzy sortable which is neither initial nor final.

Parameters:
payload - an object associated with this sortable. must not be null
Throws:
java.lang.NullPointerException - if payload is null

FuzzySort.FuzzySortable

public FuzzySort.FuzzySortable(java.lang.Object payload,
                               boolean isInitial,
                               boolean isFinal)
                        throws java.lang.IllegalArgumentException
Create a fuzzy sortable and set its initial or final state. A sortable cannot be both initial and final.

Parameters:
payload - an object associated with this sortable. must not be null
isInitial - whether the sortable wants to be in initial position
isFinal - whether the sortable wants to be in final position
Throws:
java.lang.IllegalArgumentException - if both isInitial and isFinal are true.
java.lang.NullPointerException - if payload is null
Method Detail

isInitial

public boolean isInitial()
Indicate whether this sortable wants to be in initial position.

Returns:

isFinal

public boolean isFinal()
Indicate whether this sortable wants to be in final position.

Returns:

getPayload

public java.lang.Object getPayload()

toString

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object