Interface QueryMap.Entry<K,​V>

    • Method Detail

      • extract

        <T,​E> E extract​(ValueExtractor<T,​E> extractor)
        Extract a value out of the Entry's key or value. Calling this method is semantically equivalent to extractor.extract(entry.getValue()), but this method may be significantly less expensive. For example, the resultant value may be obtained from a forward index, avoiding a potential object de-serialization.
        Type Parameters:
        T - the type of the value to extract from
        E - the type of value that will be extracted
        Parameters:
        extractor - a ValueExtractor to apply to the Entry's key or value
        Returns:
        the extracted value
      • extractFromKey

        default <E> E extractFromKey​(ValueExtractor<? super K,​E> extractor)
        Extract a value out of the Entry's key. Calling this method is semantically equivalent to extractor.extract(entry.getKey()), but this method may be significantly less expensive. For example, the resultant value may be obtained from a forward index, avoiding a potential object de-serialization.
        Type Parameters:
        E - the type of value that will be extracted
        Parameters:
        extractor - a ValueExtractor to apply to the Entry's key
        Returns:
        the extracted value
      • extractFromValue

        default <E> E extractFromValue​(ValueExtractor<? super V,​E> extractor)
        Extract a value out of the Entry's value. Calling this method is semantically equivalent to extractor.extract(entry.getValue()), but this method may be significantly less expensive. For example, the resultant value may be obtained from a forward index, avoiding a potential object de-serialization.
        Type Parameters:
        E - the type of value that will be extracted
        Parameters:
        extractor - a ValueExtractor to apply to the Entry's value
        Returns:
        the extracted value