org.apache.lucene.util

## Class FutureObjects

- java.lang.Object
- - org.apache.lucene.util.FutureObjects

-     public final class FutureObjects
      extends Object

  Additional methods from Java 9's `java.util.Objects`.

  This class will be removed when Java 9 is minimum requirement. Currently any bytecode is patched to use the Java 9 native classes through MR-JAR (Multi-Release JAR) mechanism. In Java 8 it will use THIS implementation. Because of patching, inside the Java source files we always refer to the Lucene implementations, but the final Lucene JAR files will use the native Java 9 class names when executed with Java 9.

  NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `checkFromIndexSize(int fromIndex, int size, int length)` Behaves like Java 9's Objects.checkFromIndexSize
    `static int` | `checkFromToIndex(int fromIndex, int toIndex, int length)` Behaves like Java 9's Objects.checkFromToIndex
    `static int` | `checkIndex(int index, int length)` Behaves like Java 9's Objects.checkIndex

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### checkIndex

          public static int checkIndex(int index,
                                       int length)

      Behaves like Java 9's Objects.checkIndex
      See Also:
        Objects.checkIndex

    - #### checkFromToIndex

          public static int checkFromToIndex(int fromIndex,
                                             int toIndex,
                                             int length)

      Behaves like Java 9's Objects.checkFromToIndex
      See Also:
        Objects.checkFromToIndex

    - #### checkFromIndexSize

          public static int checkFromIndexSize(int fromIndex,
                                               int size,
                                               int length)

      Behaves like Java 9's Objects.checkFromIndexSize
      See Also:
        Objects.checkFromIndexSize

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.