java.lang.Object
dev.metaschema.core.metapath.function.library.ArrayGet

public final class ArrayGet extends Object
Implements the XPath 3.1 array:get function.
  • 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 retrieval
      positionItem - 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 retrieval
      position - 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