Class AbstractPrefixMap

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> list
      A cached view of the map as a list of mutable strings.
      protected it.unimi.dsi.fastutil.objects.AbstractObject2ObjectFunction<LongInterval,​MutableString> prefixMap
      A cached view of the map as a prefix map.
      protected it.unimi.dsi.fastutil.objects.Object2ObjectFunction<java.lang.CharSequence,​LongInterval> rangeMap
      A cached view of the map as a range map.
      • Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction

        defRetValue
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract LongInterval getInterval​(java.lang.CharSequence prefix)
      Returns the range of strings having a given prefix.
      protected abstract MutableString getTerm​(long left, MutableString string)
      Writes a string specified by index into a MutableString.
      it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> list()
      Returns a list view of the domain of this string map (optional operation).
      it.unimi.dsi.fastutil.objects.Object2ObjectFunction<LongInterval,​MutableString> prefixMap()
      Returns a function mapping ranges of strings to common prefixes (optional operation).
      it.unimi.dsi.fastutil.objects.Object2ObjectFunction<java.lang.CharSequence,​LongInterval> rangeMap()
      Returns a function mapping prefixes to ranges of strings.
      • Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction

        defaultReturnValue, defaultReturnValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface it.unimi.dsi.fastutil.Function

        apply, clear, containsKey
      • Methods inherited from interface java.util.function.Function

        compose
      • Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction

        andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsLong, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, defaultReturnValue, defaultReturnValue, get, getLong, getOrDefault, getOrDefault, put, put, remove, removeLong
      • Methods inherited from interface it.unimi.dsi.fastutil.Size64

        size
    • Field Detail

      • rangeMap

        protected it.unimi.dsi.fastutil.objects.Object2ObjectFunction<java.lang.CharSequence,​LongInterval> rangeMap
        A cached view of the map as a range map.
      • prefixMap

        protected it.unimi.dsi.fastutil.objects.AbstractObject2ObjectFunction<LongInterval,​MutableString> prefixMap
        A cached view of the map as a prefix map.
      • list

        protected it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> list
        A cached view of the map as a list of mutable strings.
    • Constructor Detail

      • AbstractPrefixMap

        public AbstractPrefixMap()
    • Method Detail

      • getInterval

        protected abstract LongInterval getInterval​(java.lang.CharSequence prefix)
        Returns the range of strings having a given prefix.
        Parameters:
        prefix - a prefix.
        Returns:
        the corresponding range of strings as an interval.
      • getTerm

        protected abstract MutableString getTerm​(long left,
                                                 MutableString string)
        Writes a string specified by index into a MutableString.
        Parameters:
        left - the index of a string.
        string - a mutable string.
        Returns:
        string.
      • rangeMap

        public it.unimi.dsi.fastutil.objects.Object2ObjectFunction<java.lang.CharSequence,​LongInterval> rangeMap()
        Description copied from interface: PrefixMap
        Returns a function mapping prefixes to ranges of strings.
        Specified by:
        rangeMap in interface PrefixMap<MutableString>
        Returns:
        a function mapping prefixes to ranges of strings.
      • prefixMap

        public it.unimi.dsi.fastutil.objects.Object2ObjectFunction<LongInterval,​MutableString> prefixMap()
        Description copied from interface: PrefixMap
        Returns a function mapping ranges of strings to common prefixes (optional operation).
        Specified by:
        prefixMap in interface PrefixMap<MutableString>
        Returns:
        a function mapping ranges of strings to common prefixes, or null if this map does not support prefixes.
      • list

        public it.unimi.dsi.fastutil.objects.ObjectBigList<MutableString> list()
        Description copied from interface: StringMap
        Returns a list view of the domain of this string map (optional operation).

        Note that the list view acts as an inverse of the mapping implemented by this map.

        Specified by:
        list in interface StringMap<MutableString>
        Returns:
        a list view of the domain of this string map, or null if this map does not support this operation.