|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.util.ObjectArrayMapper
public class ObjectArrayMapper
An object mapper that takes a collection or a object array and converts it to an object array.
Field Summary | |
---|---|
static ObjectArrayMapper |
instance
The singleton instance of this class. |
Constructor Summary | |
---|---|
ObjectArrayMapper()
|
Method Summary | |
---|---|
java.lang.Object |
map(java.lang.Object value)
Call toObjectArray(value) . |
static java.lang.Object[] |
toObjectArray(java.lang.Object value)
If the argument is an instance of Object[] , return it
immediately. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ObjectArrayMapper instance
Constructor Detail |
---|
public ObjectArrayMapper()
Method Detail |
---|
public java.lang.Object map(java.lang.Object value)
toObjectArray(value)
.
map
in interface IObjectMapper
public static final java.lang.Object[] toObjectArray(java.lang.Object value)
Object[]
, return it
immediately. Otherwise, if the argument is an instance of
Collection
, return a new array of its elements.
value
- An instance of Object[]
or
Collection
.
value
. This may be the same as value.
java.lang.NullPointerException
- if value
is null
java.lang.IllegalArgumentException
- if value
is neither an
instance of Object[]
nor Collection
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |