java.lang.Object
dev.metaschema.core.metapath.function.library.ArrayRemove
Implements the XPath 3.1 array:remove
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IItem>
IArrayItem<T>remove(IArrayItem<T> array, Collection<Integer> positions) An implementation of XPath 3.1 array:remove.static <T extends IItem>
IArrayItem<T>removeItems(IArrayItem<T> array, Collection<? extends IIntegerItem> positions) An implementation of XPath 3.1 array:remove.
-
Method Details
-
removeItems
@NonNull public static <T extends IItem> IArrayItem<T> removeItems(@NonNull IArrayItem<T> array, @NonNull Collection<? extends IIntegerItem> positions) An implementation of XPath 3.1 array:remove.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
array- the target Metapath arraypositions- the integer position of the items to remove- 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
-
remove
@NonNull public static <T extends IItem> IArrayItem<T> remove(@NonNull IArrayItem<T> array, @NonNull Collection<Integer> positions) An implementation of XPath 3.1 array:remove.- Type Parameters:
T- the type of items in the given Metapath array- Parameters:
array- the target Metapath arraypositions- the integer position of the items to remove- 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
-