java.lang.Object
dev.metaschema.core.metapath.function.library.ArrayPut
Implements the XPath 3.1 array:put
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ICollectionValue>
IArrayItem<T>put(IArrayItem<T> array, int position, T member) An implementation of XPath 3.1 array:put.static <T extends ICollectionValue>
IArrayItem<T>put(IArrayItem<T> array, IIntegerItem positionItem, T member) An implementation of XPath 3.1 array:put.
-
Method Details
-
put
@NonNull public static <T extends ICollectionValue> IArrayItem<T> put(@NonNull IArrayItem<T> array, @NonNull IIntegerItem positionItem, @NonNull T member) An implementation of XPath 3.1 array:put.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
array- the target Metapath arraypositionItem- the integer position of the item to replacemember- the Metapath item to replace the identified array member with- Returns:
- a new array containing the modification
- Throws:
NegativeLengthArrayMetapathException- if the position is negativeIndexOutOfBoundsArrayMetapathException- if the position is not in the range of 1 to array:size
-
put
@NonNull public static <T extends ICollectionValue> IArrayItem<T> put(@NonNull IArrayItem<T> array, int position, @NonNull T member) An implementation of XPath 3.1 array:put.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
array- the target Metapath arrayposition- the integer position of the item to replacemember- the Metapath item to replace the identified array member with- Returns:
- a new array containing the modification
- Throws:
NegativeLengthArrayMetapathException- if the position is negativeIndexOutOfBoundsArrayMetapathException- if the position is not in the range of 1 to array:size
-