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

public final class MapFind extends Object
Implements the XPath 3.1 map:find function.
  • Method Details

    • find

      @NonNull public static Stream<ICollectionValue> find(@NonNull Collection<? extends IItem> items, @NonNull IAnyAtomicItem key)
      An implementation of XPath 3.1 map:find.
      Parameters:
      items - the item sequence to search for key matches
      key - the key for the item to retrieve
      Returns:
      the retrieved item
    • find

      @NonNull public static Stream<ICollectionValue> find(@NonNull IItem item, @NonNull IAnyAtomicItem key)
      An implementation of XPath 3.1 map:find.
      Parameters:
      item - the item to search for key matches
      key - the key for the item to retrieve
      Returns:
      the retrieved item
    • find

      @NonNull public static Stream<ICollectionValue> find(@NonNull IMapItem<?> item, @NonNull IAnyAtomicItem key)
      An implementation of XPath 3.1 map:find.

      This is a specialized method for processing an item that is a map item, which can be searched for a key in a much more efficient way.

      Parameters:
      item - the item to search for key matches
      key - the key for the item to retrieve
      Returns:
      the retrieved item