Class FutureArrays

java.lang.Object
org.apache.lucene.util.FutureArrays

public final class FutureArrays extends Object
Additional methods from Java 9's java.util.Arrays.

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.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    checkFromToIndex(int fromIndex, int toIndex, int length)
     
    static int
    compare(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.compare
    static int
    compare(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.compare
    static int
    compare(long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.compare
    static int
    compareUnsigned(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.compareUnsigned
    static boolean
    equals(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.equals
    static boolean
    equals(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.equals
    static boolean
    equals(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.equals
    static boolean
    equals(long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.equals
    static int
    mismatch(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.mismatch
    static int
    mismatch(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
    Behaves like Java 9's Arrays.mismatch

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FutureArrays

      private FutureArrays()
  • Method Details

    • checkFromToIndex

      private static void checkFromToIndex(int fromIndex, int toIndex, int length)
    • mismatch

      public static int mismatch(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.mismatch
      See Also:
    • compareUnsigned

      public static int compareUnsigned(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.compareUnsigned
      See Also:
    • equals

      public static boolean equals(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.equals
      See Also:
    • mismatch

      public static int mismatch(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.mismatch
      See Also:
    • compare

      public static int compare(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.compare
      See Also:
    • equals

      public static boolean equals(char[] a, int aFromIndex, int aToIndex, char[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.equals
      See Also:
    • compare

      public static int compare(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.compare
      See Also:
    • equals

      public static boolean equals(int[] a, int aFromIndex, int aToIndex, int[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.equals
      See Also:
    • compare

      public static int compare(long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.compare
      See Also:
    • equals

      public static boolean equals(long[] a, int aFromIndex, int aToIndex, long[] b, int bFromIndex, int bToIndex)
      Behaves like Java 9's Arrays.equals
      See Also: