public interface XIntAdapter<T>
Modifier and Type | Method and Description |
---|---|
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.
|
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.Copyright © 2019 Neeve Research, LLC. All Rights Reserved.