public class XmpArray extends XmpValueBase
Represents base abstraction for XMP array.
Constructor and Description |
---|
XmpArray(XmpArrayType arrayType,
XmpComplexType[] items)
Initializes a new instance of the
XmpArray class. |
XmpArray(XmpArrayType arrayType,
XmpValueBase[] items)
Initializes a new instance of the
XmpArray class. |
Modifier and Type | Method and Description |
---|---|
static XmpArray |
from(Date[] array,
XmpArrayType type)
Creates an
XmpArray instance form a date array. |
static XmpArray |
from(double[] array,
XmpArrayType type)
Creates an
XmpArray instance form a double array. |
static XmpArray |
from(int[] array,
XmpArrayType type)
Creates an
XmpArray instance form an integer array. |
static XmpArray |
from(String[] array,
XmpArrayType type)
Creates an
XmpArray instance form a string array. |
static <T extends XmpComplexType> |
from(T[] array,
XmpArrayType type)
Creates an
XmpArray instance form an array of XmpComplexType . |
XmpArrayType |
getArrayType()
Gets the type of the XMP array.
|
String |
getXmpRepresentation()
Converts XMP value to the xml representation.
|
<T> T[] |
toPlatformArray(Class<T> type)
Converts the
XmpArray to a platform-specific array. |
toString
acceptValue, getRawValue, getType, toArray, toClass
public XmpArray(XmpArrayType arrayType, XmpValueBase[] items)
Initializes a new instance of the XmpArray
class.
arrayType
- Array type.items
- Array items.public XmpArray(XmpArrayType arrayType, XmpComplexType[] items)
Initializes a new instance of the XmpArray
class.
arrayType
- Array type.items
- Array items.public final XmpArrayType getArrayType()
Gets the type of the XMP array.
public static <T extends XmpComplexType> XmpArray from(T[] array, XmpArrayType type)
Creates an XmpArray
instance form an array of XmpComplexType
.
array
- The array to create an XmpArray
from.type
- The type of the XmpArray
.
T
: The element type of the source array.
XmpArray
containing all the elements from the original array.public static XmpArray from(String[] array, XmpArrayType type)
Creates an XmpArray
instance form a string array.
array
- The array to create an XmpArray
from.type
- The type of the XmpArray
.XmpArray
containing all the elements from the original array.public static XmpArray from(int[] array, XmpArrayType type)
Creates an XmpArray
instance form an integer array.
array
- The array to create an XmpArray
from.type
- The type of the XmpArray
.XmpArray
containing all the elements from the original array.public static XmpArray from(Date[] array, XmpArrayType type)
Creates an XmpArray
instance form a date array.
array
- The array to create an XmpArray
from.type
- The type of the XmpArray
.XmpArray
containing all the elements from the original array.public static XmpArray from(double[] array, XmpArrayType type)
Creates an XmpArray
instance form a double array.
array
- The array to create an XmpArray
from.type
- The type of the XmpArray
.XmpArray
containing all the elements from the original array.public String getXmpRepresentation()
Converts XMP value to the xml representation.
getXmpRepresentation
in interface IXmpType
getXmpRepresentation
in class XmpValueBase
string
representation of XMP value.public final <T> T[] toPlatformArray(Class<T> type)
Converts the XmpArray
to a platform-specific array.
XmpArray
.
T
: The type of the array element.