Class RangeRequests


  • public final class RangeRequests
    extends Object
    • Method Detail

      • previousLexicographicName

        public static byte[] previousLexicographicName​(@Nonnull
                                                       byte[] name)
        This will return the first byte[] less than the given byte[] lexicographically.

        If name is the array new byte[] { 0 } an empty byte[] will be returned.

        This method will throw if the empty byte array is passed. It will also reject arrays with length greater than Cell.MAX_NAME_LENGTH

      • nextLexicographicName

        public static byte[] nextLexicographicName​(@Nonnull
                                                   byte[] name)
      • oneAfterMaximumName

        public static byte[] oneAfterMaximumName()
      • endRowExclusiveOrOneAfterMax

        public static byte[] endRowExclusiveOrOneAfterMax​(RangeRequest rangeRequest)
        This is a replacement for endRow when doing a non-reverse range request.
      • startRowInclusiveOrLargestRow

        public static byte[] startRowInclusiveOrLargestRow​(RangeRequest rangeRequest)
        This is a replacement for startRow when doing reverse range request.
      • getFirstRowName

        public static byte[] getFirstRowName()
      • getLastRowName

        public static byte[] getLastRowName()
      • getLastColumnName

        public static byte[] getLastColumnName()
      • isFirstRowName

        public static boolean isFirstRowName​(boolean reverse,
                                             @Nonnull
                                             byte[] name)
      • isFirstRowName

        public static boolean isFirstRowName​(@Nonnull
                                             byte[] name)
      • isLastRowName

        public static boolean isLastRowName​(@Nonnull
                                            byte[] name)
      • isLastColumnName

        public static boolean isLastColumnName​(@Nonnull
                                               byte[] name)
      • isTerminalRow

        public static boolean isTerminalRow​(boolean reverse,
                                            @Nonnull
                                            byte[] rowName)
      • getNextStartRow

        public static byte[] getNextStartRow​(boolean reverse,
                                             @Nonnull
                                             byte[] rowName)
      • getNextStartRowUnlessTerminal

        @Nullable
        public static byte[] getNextStartRowUnlessTerminal​(boolean reverse,
                                                           @Nonnull
                                                           byte[] rowName)
      • isContiguousRange

        public static boolean isContiguousRange​(boolean reverse,
                                                byte[] startInclusive,
                                                byte[] endExclusive)
      • isExactlyEmptyRange

        public static boolean isExactlyEmptyRange​(byte[] startInclusive,
                                                  byte[] endExclusive)