public class NumCompOp extends Object implements AbstractOp, Comparator<Number>
Constructor and Description |
---|
NumCompOp() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Number v1,
Number v2) |
Number |
doDoubleOp(Number arg1,
Number arg2)
Do operation on Double type operands.
|
Number |
doFloatOp(Number arg1,
Number arg2)
Do operation on Float type operands.
|
Number |
doIntOp(Number arg1,
Number arg2)
Do operation on integer type operands (Long, Integer, Short,
Byte).
|
Number |
doVersionOp(Number arg1,
Number arg2)
Do operation on Version types operands.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public Number doIntOp(Number arg1, Number arg2)
AbstractOp
doIntOp
in interface AbstractOp
public Number doDoubleOp(Number arg1, Number arg2)
AbstractOp
At least one of operands must be Double, rest may be integer types or Float.
doDoubleOp
in interface AbstractOp
public Number doVersionOp(Number arg1, Number arg2)
AbstractOp
At least one of operands must be Version, others may be other numeric types.
doVersionOp
in interface AbstractOp
public Number doFloatOp(Number arg1, Number arg2)
AbstractOp
At least one of operands must be Float, the rest may be integer types.
doFloatOp
in interface AbstractOp
public int compare(Number v1, Number v2)
compare
in interface Comparator<Number>
Copyright © 2022. All rights reserved.