java.lang.Object
dev.metaschema.core.metapath.function.library.ArrayGet
Implements the XPath 3.1 array:get
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ICollectionValue>
Tget(IArrayItem<T> target, int position) An implementation of XPath 3.1 array:get.static <T extends ICollectionValue>
Tget(IArrayItem<T> target, IIntegerItem positionItem) An implementation of XPath 3.1 array:get.
-
Method Details
-
get
@NonNull public static <T extends ICollectionValue> T get(@NonNull IArrayItem<T> target, @NonNull IIntegerItem positionItem) An implementation of XPath 3.1 array:get.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
target- the array of Metapath items that is the target of retrievalpositionItem- the integer position of the item to retrieve- Returns:
- the retrieved item
- Throws:
IndexOutOfBoundsArrayMetapathException- if the position is not in the range of 1 to array:size
-
get
@NonNull public static <T extends ICollectionValue> T get(@NonNull IArrayItem<T> target, int position) An implementation of XPath 3.1 array:get.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
target- the array of Metapath items that is the target of retrievalposition- the integer position of the item to retrieve- Returns:
- the retrieved item
- Throws:
IndexOutOfBoundsArrayMetapathException- if the position is not in the range of 1 to array:size
-