Package org.apache.sis.internal.jdk9
Class JDK9
java.lang.Object
org.apache.sis.internal.jdk9.JDK9
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Map <K, V> Placeholder forMap.copyOf(...)
(actually a JDK10 method).static <V> Set
<V> Placeholder forSet.copyOf(...)
(actually a JDK10 method).static Buffer
Place holder forBuffer.duplicate()
.static boolean
equals
(byte[] a, int ai, int aUp, byte[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(char[] a, int ai, int aUp, char[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(double[] a, int ai, int aUp, double[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(float[] a, int ai, int aUp, float[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(int[] a, int ai, int aUp, int[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(long[] a, int ai, int aUp, long[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static boolean
equals
(short[] a, int ai, int aUp, short[] b, int bi, int bUp) Place holder forArrays
method added in JDK9.static void
get
(ByteBuffer b, int index, byte[] dst) Place holder forByteBuffer.get(int, byte[])
.static void
get
(ByteBuffer b, int index, byte[] dst, int offset, int length) Place holder forByteBuffer.get(int, byte[], int, int)
.static String
getPackageName
(Class<?> c) Place holder forClass.getPackageName()
.static <T> void
ifPresentOrElse
(Optional<T> optional, Consumer<? super T> action, Runnable emptyAction) Placeholder forOptional.ifPresentOrElse(Consumer, Runnable)
.static <E> List
<E> listOf
(E... elements) Placeholder forList.of(...)
.static <K,
V> Map <K, V> Placeholder forMap.of(...)
.static long
multiplyFull
(int x, int y) Place holder forMath.multiplyFull​(int, int)
.static String
readString
(Path path) Placeholder forFiles.readString(Path)
.static <E> Set
<E> setOf
(E... elements) Placeholder forSet.of(...)
.static Buffer
Place holder forBuffer.slice()
.static <T> List
<T> Place holder forStream.toList()
method added in JDK16.
-
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) Placeholder forOptional.ifPresentOrElse(Consumer, Runnable)
. -
listOf
Placeholder forList.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
Placeholder forSet.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
Placeholder forMap.of(...)
. -
copyOf
Placeholder forSet.copyOf(...)
(actually a JDK10 method). -
copyOf
Placeholder forMap.copyOf(...)
(actually a JDK10 method). -
slice
Place holder forBuffer.slice()
.- Parameters:
b
- the buffer to slice.- Returns:
- the sliced buffer.
-
duplicate
Place holder forBuffer.duplicate()
.- Parameters:
b
- the buffer to duplicate.- Returns:
- the duplicate buffer.
-
get
Place holder forByteBuffer.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
Place holder forByteBuffer.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 arrayoffset
- offset in the array of the first byte to write.length
- number of bytes to write.
-
getPackageName
Place holder forClass.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 forMath.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 forArrays
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 forArrays
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 forArrays
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 forArrays
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 forArrays
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 forArrays
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 forArrays
method added in JDK9. This placeholder does not perform range check (JDK9 method does). -
toList
Place holder forStream.toList()
method added in JDK16. -
readString
Placeholder forFiles.readString(Path)
.- Throws:
IOException
-