Interface RLexSortedSet

    • Method Detail

      • pollFirst

        String pollFirst()
        Removes and returns the head element or null if this sorted set is empty.
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        String pollLast()
        Removes and returns the tail element or null if this sorted set is empty.
        Returns:
        the tail element or null if this sorted set is empty
      • revRank

        Integer revRank(String o)
        Returns rank of value, with the scores ordered from high to low.
        Parameters:
        o - - object
        Returns:
        rank or null if value does not exist
      • removeRangeTail

        int removeRangeTail(String fromElement,
                            boolean fromInclusive)
        Removes tail values range starting with fromElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        Returns:
        number of elements removed
      • removeRangeHead

        int removeRangeHead(String toElement,
                            boolean toInclusive)
        Removes head values range ending with toElement.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        number of elements removed
      • removeRange

        int removeRange(String fromElement,
                        boolean fromInclusive,
                        String toElement,
                        boolean toInclusive)
        Removes values range starting with fromElement and ending with toElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        number of elements removed
      • countTail

        int countTail(String fromElement,
                      boolean fromInclusive)
        Returns the number of tail values starting with fromElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        Returns:
        number of elements
      • countHead

        int countHead(String toElement,
                      boolean toInclusive)
        Returns the number of head values ending with toElement.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        number of elements
      • rangeTail

        Collection<String> rangeTail(String fromElement,
                                     boolean fromInclusive)
        Returns tail values range starting with fromElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        Returns:
        collection of elements
      • rangeHead

        Collection<String> rangeHead(String toElement,
                                     boolean toInclusive)
        Returns head values range ending with toElement.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        collection of elements
      • range

        Collection<String> range(String fromElement,
                                 boolean fromInclusive,
                                 String toElement,
                                 boolean toInclusive)
        Returns values range starting with fromElement and ending with toElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        collection of elements
      • rangeTail

        Collection<String> rangeTail(String fromElement,
                                     boolean fromInclusive,
                                     int offset,
                                     int count)
        Returns tail values range starting with fromElement. Returned collection limited by count and starts with offset.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • rangeHead

        Collection<String> rangeHead(String toElement,
                                     boolean toInclusive,
                                     int offset,
                                     int count)
        Returns head values range ending with toElement. Returned collection limited by count and starts with offset.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • range

        Collection<String> range(String fromElement,
                                 boolean fromInclusive,
                                 String toElement,
                                 boolean toInclusive,
                                 int offset,
                                 int count)
        Returns values range starting with fromElement and ending with toElement. Returned collection limited by count and starts with offset.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • rangeTailReversed

        Collection<String> rangeTailReversed(String fromElement,
                                             boolean fromInclusive)
        Returns tail values range in reverse order starting with fromElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        Returns:
        collection of elements
      • rangeHeadReversed

        Collection<String> rangeHeadReversed(String toElement,
                                             boolean toInclusive)
        Returns head values range in reverse order ending with toElement.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        collection of elements
      • rangeReversed

        Collection<String> rangeReversed(String fromElement,
                                         boolean fromInclusive,
                                         String toElement,
                                         boolean toInclusive)
        Returns values range in reverse order starting with fromElement and ending with toElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        collection of elements
      • rangeTailReversed

        Collection<String> rangeTailReversed(String fromElement,
                                             boolean fromInclusive,
                                             int offset,
                                             int count)
        Returns tail values range in reverse order starting with fromElement. Returned collection limited by count and starts with offset.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • rangeHeadReversed

        Collection<String> rangeHeadReversed(String toElement,
                                             boolean toInclusive,
                                             int offset,
                                             int count)
        Returns head values range in reverse order ending with toElement. Returned collection limited by count and starts with offset.
        Parameters:
        toElement - - end element
        toInclusive - - end element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • rangeReversed

        Collection<String> rangeReversed(String fromElement,
                                         boolean fromInclusive,
                                         String toElement,
                                         boolean toInclusive,
                                         int offset,
                                         int count)
        Returns values range in reverse order starting with fromElement and ending with toElement. Returned collection limited by count and starts with offset.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        offset - - offset of result collection
        count - - amount of result collection
        Returns:
        collection of elements
      • count

        int count(String fromElement,
                  boolean fromInclusive,
                  String toElement,
                  boolean toInclusive)
        Returns the number of elements between fromElement and toElement.
        Parameters:
        fromElement - - start element
        fromInclusive - - start element inclusive
        toElement - - end element
        toInclusive - - end element inclusive
        Returns:
        number of elements
      • rank

        Integer rank(String o)
        Returns rank of the element
        Parameters:
        o - - element to rank
        Returns:
        rank or null if element does not exist
      • range

        Collection<String> range(int startIndex,
                                 int endIndex)
        Returns values by rank range. Indexes are zero based. -1 means the highest score, -2 means the second highest score.
        Parameters:
        startIndex - - start index
        endIndex - - end index
        Returns:
        collection of elements