Package net.sf.ezmorph.array
Class AbstractArrayMorpher
java.lang.Object
net.sf.ezmorph.array.AbstractArrayMorpher
- All Implemented Interfaces:
Morpher,ObjectMorpher
- Direct Known Subclasses:
BooleanArrayMorpher,BooleanObjectArrayMorpher,ByteArrayMorpher,CharacterObjectArrayMorpher,CharArrayMorpher,DoubleArrayMorpher,FloatArrayMorpher,IntArrayMorpher,LongArrayMorpher,ObjectArrayMorpher,ShortArrayMorpher
Base class for array Morphers.
- Author:
- Andres Almiray aalmiray@users.sourceforge.net
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int[]createDimensions(int length, int initial) Creates an array representing the dimensions for comversion.protected intgetDimensions(Class arrayClass) Returns the number of dimensions in an array class.booleanReturns if this morpher will use a default value.voidsetUseDefault(boolean useDefault) Sets if this morpher will use a default value.booleanReturns true if the Morpher supports conversion from this Class.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.ezmorph.ObjectMorpher
morph
-
Constructor Details
-
AbstractArrayMorpher
public AbstractArrayMorpher() -
AbstractArrayMorpher
public AbstractArrayMorpher(boolean useDefault) - Parameters:
useDefault- if morph() should return a default value if the value to be morphed is null
-
-
Method Details
-
isUseDefault
public boolean isUseDefault()Returns if this morpher will use a default value. -
setUseDefault
public void setUseDefault(boolean useDefault) Sets if this morpher will use a default value. -
supports
Description copied from interface:MorpherReturns true if the Morpher supports conversion from this Class. -
createDimensions
protected int[] createDimensions(int length, int initial) Creates an array representing the dimensions for comversion. -
getDimensions
Returns the number of dimensions in an array class.
-