Class JDK9

java.lang.Object
org.apache.sis.internal.jdk9.JDK9

public final class JDK9 extends Object
Place holder for some functionalities defined only in JDK9. This file will be deleted on the SIS JDK9 branch.
Since:
1.1
Version:
0.8
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K, V> Map<K,V>
    copyOf(Map<K,V> map)
    Placeholder for Map.copyOf(...) (actually a JDK10 method).
    static <V> Set<V>
    copyOf(Set<V> set)
    Placeholder for Set.copyOf(...) (actually a JDK10 method).
    static Buffer
    Place holder for Buffer.duplicate().
    static boolean
    equals(byte[] a, int ai, int aUp, byte[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(char[] a, int ai, int aUp, char[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(double[] a, int ai, int aUp, double[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(float[] a, int ai, int aUp, float[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(int[] a, int ai, int aUp, int[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(long[] a, int ai, int aUp, long[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static boolean
    equals(short[] a, int ai, int aUp, short[] b, int bi, int bUp)
    Place holder for Arrays method added in JDK9.
    static void
    get(ByteBuffer b, int index, byte[] dst)
    Place holder for ByteBuffer.get(int, byte[]).
    static void
    get(ByteBuffer b, int index, byte[] dst, int offset, int length)
    Place holder for ByteBuffer.get(int, byte[], int, int).
    static String
    Place holder for Class.getPackageName().
    static <T> void
    ifPresentOrElse(Optional<T> optional, Consumer<? super T> action, Runnable emptyAction)
    static <E> List<E>
    listOf(E... elements)
    Placeholder for List.of(...).
    static <K, V> Map<K,V>
    mapOf(Object... entries)
    Placeholder for Map.of(...).
    static long
    multiplyFull(int x, int y)
    Place holder for Math.multiplyFull​(int, int).
    static String
    Placeholder for Files.readString(Path).
    static <E> Set<E>
    setOf(E... elements)
    Placeholder for Set.of(...).
    static Buffer
    Place holder for Buffer.slice().
    static <T> List<T>
    toList(Stream<T> s)
    Place holder for Stream.toList() method added in JDK16.

    Methods inherited from class java.lang.Object

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

    • JDK9

      private JDK9()
      Do not allow instantiation of this class.
  • Method Details

    • ifPresentOrElse

      public static <T> void ifPresentOrElse(Optional<T> optional, Consumer<? super T> action, Runnable emptyAction)
    • listOf

      @SafeVarargs public static <E> List<E> listOf(E... elements)
      Placeholder for List.of(...).
      Type Parameters:
      E - type of elements.
      Parameters:
      elements - the elements to put in an unmodifiable list.
      Returns:
      an unmodifiable list of the given elements.
    • setOf

      @SafeVarargs public static <E> Set<E> setOf(E... elements)
      Placeholder for Set.of(...).
      Type Parameters:
      E - type of elements.
      Parameters:
      elements - the elements to put in an unmodifiable set.
      Returns:
      an unmodifiable set of the given elements.
    • mapOf

      public static <K, V> Map<K,V> mapOf(Object... entries)
      Placeholder for Map.of(...).
    • copyOf

      public static <V> Set<V> copyOf(Set<V> set)
      Placeholder for Set.copyOf(...) (actually a JDK10 method).
    • copyOf

      public static <K, V> Map<K,V> copyOf(Map<K,V> map)
      Placeholder for Map.copyOf(...) (actually a JDK10 method).
    • slice

      public static Buffer slice(Buffer b)
      Place holder for Buffer.slice().
      Parameters:
      b - the buffer to slice.
      Returns:
      the sliced buffer.
    • duplicate

      public static Buffer duplicate(Buffer b)
      Place holder for Buffer.duplicate().
      Parameters:
      b - the buffer to duplicate.
      Returns:
      the duplicate buffer.
    • get

      public static void get(ByteBuffer b, int index, byte[] dst)
      Place holder for ByteBuffer.get(int, byte[]).
      Parameters:
      b - the buffer from which to get bytes.
      index - index from which the first byte will be read.
      dst - destination array
    • get

      public static void get(ByteBuffer b, int index, byte[] dst, int offset, int length)
      Place holder for ByteBuffer.get(int, byte[], int, int).
      Parameters:
      b - the buffer from which to get bytes.
      index - index from which the first byte will be read.
      dst - destination array
      offset - offset in the array of the first byte to write.
      length - number of bytes to write.
    • getPackageName

      public static String getPackageName(Class<?> c)
      Place holder for Class.getPackageName().
      Parameters:
      c - the class for which to get the package name.
      Returns:
      the name of the package.
    • multiplyFull

      public static long multiplyFull(int x, int y)
      Place holder for Math.multiplyFull​(int, int).
      Parameters:
      x - the first value.
      y - the second value.
      Returns:
      Product of the two values.
    • equals

      public static boolean equals(char[] a, int ai, int aUp, char[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(byte[] a, int ai, int aUp, byte[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(short[] a, int ai, int aUp, short[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(int[] a, int ai, int aUp, int[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(long[] a, int ai, int aUp, long[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(float[] a, int ai, int aUp, float[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • equals

      public static boolean equals(double[] a, int ai, int aUp, double[] b, int bi, int bUp)
      Place holder for Arrays method added in JDK9. This placeholder does not perform range check (JDK9 method does).
    • toList

      public static <T> List<T> toList(Stream<T> s)
      Place holder for Stream.toList() method added in JDK16.
    • readString

      public static String readString(Path path) throws IOException
      Placeholder for Files.readString(Path).
      Throws:
      IOException