Class InstanceOfIterator

All Implemented Interfaces:
Serializable, AtMostOneLocalRuntimePlan<Item>, LocalRuntimePlan<Item>

public class InstanceOfIterator extends AbstractAtMostOneItemRuntimePlan
See Also:
  • Constructor Details

  • Method Details

    • evaluateAtMostOne

      public Item evaluateAtMostOne(DynamicContext dynamicContext)
      Description copied from interface: AtMostOneLocalRuntimePlan
      Evaluates the plan without allocating a cursor.
      Specified by:
      evaluateAtMostOne in interface AtMostOneLocalRuntimePlan<Item>
      Specified by:
      evaluateAtMostOne in class AbstractAtMostOneItemRuntimePlan
      Parameters:
      dynamicContext - the dynamic context for the evaluation
      Returns:
      the value, or null for the empty sequence
    • doesItemTypeMatchItem

      public static boolean doesItemTypeMatchItem(ItemType itemType, Item itemToMatch)
      Item type tests. This supersedes the method isTypeOf() formerly located in the Item interface, as part of the efforts to cleanly separate item storage from item manipulation (which is the domain of responsibility of runtime iterators).
      Parameters:
      itemType - the item type to match against the item.
      itemToMatch - the item to match against the type.
      Returns:
      true if itemToMatch matches itemType.