|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.util.ConstantIntMapper
public final class ConstantIntMapper
An implementation of IIntMapper
that maps all integers to a
single constant.
Field Summary | |
---|---|
static ConstantIntMapper |
NEGATIVE_ONE
An instance that always returns -1. |
static ConstantIntMapper |
ONE
An instance that always returns 1. |
static ConstantIntMapper |
ZERO
An instance that always returns 0. |
Constructor Summary | |
---|---|
ConstantIntMapper(int value)
Construct a new instance that whose map() method always
returns value . |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
int |
map(int x)
Return the constant value. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ConstantIntMapper ZERO
public static final ConstantIntMapper ONE
public static final ConstantIntMapper NEGATIVE_ONE
Constructor Detail |
---|
public ConstantIntMapper(int value)
map()
method always
returns value
.
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public int map(int x)
map
in interface IIntMapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |