|
JBoss Logging I18n Annotation Processor 1.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.logging.processor.util.Comparison
public abstract class Comparison
Date: 30.08.2011
| Field Summary | |
|---|---|
static int |
EQUAL
|
static int |
GREATER
|
static int |
LESS
|
| Method Summary | ||
|---|---|---|
static Comparison |
begin()
Begins a new comparison. |
|
static Comparison |
beginAllowNull()
Begins a new comparison, but allows for null values to be passed. |
|
Comparison |
compare(boolean left,
boolean right)
Compares the left boolean to the double boolean. |
|
abstract Comparison |
compare(Comparable<?> left,
Comparable<?> right)
Compares the left comparable to the right as specified by the Comparable.compareTo(Object) interface. |
|
Comparison |
compare(double left,
double right)
Compares the left double to the double integer. |
|
Comparison |
compare(float left,
float right)
Compares the left float to the float integer. |
|
Comparison |
compare(int left,
int right)
Compares the left integer to the right integer. |
|
Comparison |
compare(long left,
long right)
Compares the left long to the right long. |
|
abstract
|
compare(T left,
T right,
Comparator<T> comparator)
Compares the left object to the right object as specified by the Comparator.compare(Object, Object)
interface. |
|
protected abstract Comparison |
getInstance()
Returns the comparison instance being used. |
|
int |
result()
Ends the comparison and returns 0 if all comparisons were equal, -1 if the any of the left comparisons were less than the right comparisons or 1 if any of the right comparisons were less than the left. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EQUAL
public static final int LESS
public static final int GREATER
| Method Detail |
|---|
public static Comparison begin()
public static Comparison beginAllowNull()
null values to be passed.
If the first value is null and the second value is
non-null, the comparison will return -1. If the first value is
non-null and the second value is null, the comparison
will return 1. If both values are null 0 is returned.
public abstract Comparison compare(Comparable<?> left,
Comparable<?> right)
Comparable.compareTo(Object) interface.
left - the object to compare to the right.right - the object compared to the left.
public abstract <T> Comparison compare(T left,
T right,
Comparator<T> comparator)
Comparator.compare(Object, Object)
interface.
T - the type of the object to the compared.left - the object to compare to the right.right - the object compared to the left.comparator - the comparator used to compare the objects.
public Comparison compare(int left,
int right)
left - the integer to compare to the right.right - the integer compared to the left.
public Comparison compare(long left,
long right)
left - the long to compare to the right.right - the long compared to the left.
public Comparison compare(float left,
float right)
left - the float to compare to the right.right - the float compared to the left.
public Comparison compare(double left,
double right)
left - the double to compare to the right.right - the double compared to the left.
public Comparison compare(boolean left,
boolean right)
left - the boolean to compare to the right.right - the boolean compared to the left.
public int result()
protected abstract Comparison getInstance()
|
JBoss Logging I18n Annotation Processor 1.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||