Class SegmentedHashMap.ContainsValueAction

  • All Implemented Interfaces:
    SegmentedHashMap.EntryAction, SegmentedHashMap.IterableEntryAction
    Enclosing class:
    SegmentedHashMap

    protected static class SegmentedHashMap.ContainsValueAction
    extends SegmentedHashMap.EntryActionAdapter
    Action support for containsValue(). The action performs a lookup by value and is not required to run while holding any segment-locks.

    The context object for a ContainsValueAction is an opaque context created by instantiateContext.

    The result of invoking a ContainsValueAction is Boolean.TRUE if the value is found in the map or Boolean.FALSE if the value is not found in the map.

    • Constructor Detail

      • ContainsValueAction

        protected ContainsValueAction()
    • Method Detail

      • isFound

        public boolean isFound​(Object oContext)
        Return true iff the value was found
        Parameters:
        oContext - the ContainsValueContext object
        Returns:
        true iff the value was found
      • instantiateContext

        public Object instantiateContext​(Object oValue)
        Instantiate a context appropriate for applying ContainsValueAction to lookup oValue in the map.
        Parameters:
        oValue - the value to test the existence of
        Returns:
        a context to use with a ContainsValueAction