|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XIntAdapter<T>
Adapts an int to another type.
Method Summary | |
---|---|
T |
adaptFrom(int from)
Returns the adapated value or null if the value can't be adapted. |
int |
adaptTo(T to)
|
boolean |
canAdaptFrom(int from)
Test if the adapter is able to adapt from an int to the given type. |
T[] |
newArray(int size)
Creates a new array of type T. |
Method Detail |
---|
boolean canAdaptFrom(int from)
from
- The int value from which to adapt.
IllegalArgumentException
- If the value cannot be adapted.T adaptFrom(int from)
A return value of null could either mean that the value adapted to null
or that the adapter can't adapt the value. If the value is null the caller
can distinguish between the two cases by calling canAdaptFrom(int)
.
from
- The int value from which to adapt.
IllegalArgumentException
- If the value cannot be adapted.int adaptTo(T to)
to
- The value to adapt to an int.
IllegalArgumentException
- If the value cannot be adapted.T[] newArray(int size)
size
- the size of the array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |