Class TArrays

java.lang.Object
org.teavm.classlib.java.lang.TObject
org.teavm.classlib.java.util.TArrays

public class TArrays extends TObject
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> TList<T>
    asList​(T... a)
     
    static int
    binarySearch​(byte[] a, byte key)
     
    static int
    binarySearch​(byte[] a, int fromIndex, int toIndex, byte key)
     
    static int
    binarySearch​(char[] a, char key)
     
    static int
    binarySearch​(char[] a, int fromIndex, int toIndex, char key)
     
    static int
    binarySearch​(double[] a, double key)
     
    static int
    binarySearch​(double[] a, int fromIndex, int toIndex, double key)
     
    static int
    binarySearch​(float[] a, float key)
     
    static int
    binarySearch​(float[] a, int fromIndex, int toIndex, float key)
     
    static int
    binarySearch​(int[] a, int key)
     
    static int
    binarySearch​(int[] a, int fromIndex, int toIndex, int key)
     
    static int
    binarySearch​(long[] a, int fromIndex, int toIndex, long key)
     
    static int
    binarySearch​(long[] a, long key)
     
    static int
    binarySearch​(short[] a, int fromIndex, int toIndex, short key)
     
    static int
    binarySearch​(short[] a, short key)
     
    static int
    binarySearch​(Object[] a, int fromIndex, int toIndex, Object key)
     
    static int
    binarySearch​(Object[] a, Object key)
     
    static <T> int
    binarySearch​(T[] a, int fromIndex, int toIndex, T key, TComparator<? super T> c)
     
    static <T> int
    binarySearch​(T[] a, T key, TComparator<? super T> c)
     
    static boolean[]
    copyOf​(boolean[] array, int length)
     
    static byte[]
    copyOf​(byte[] array, int length)
     
    static char[]
    copyOf​(char[] array, int length)
     
    static double[]
    copyOf​(double[] array, int length)
     
    static float[]
    copyOf​(float[] array, int length)
     
    static int[]
    copyOf​(int[] array, int length)
     
    static long[]
    copyOf​(long[] array, int length)
     
    static short[]
    copyOf​(short[] array, int length)
     
    static <T> T[]
    copyOf​(T[] original, int newLength)
     
    static <T,​ U> T[]
    copyOf​(U[] original, int newLength, Class<? extends T[]> cls)
     
    static boolean[]
    copyOfRange​(boolean[] array, int from, int to)
     
    static byte[]
    copyOfRange​(byte[] array, int from, int to)
     
    static char[]
    copyOfRange​(char[] array, int from, int to)
     
    static double[]
    copyOfRange​(double[] array, int from, int to)
     
    static float[]
    copyOfRange​(float[] array, int from, int to)
     
    static int[]
    copyOfRange​(int[] array, int from, int to)
     
    static long[]
    copyOfRange​(long[] array, int from, int to)
     
    static short[]
    copyOfRange​(short[] array, int from, int to)
     
    static <T> T[]
    copyOfRange​(T[] original, int from, int to)
     
    static <T,​ U> T[]
    copyOfRange​(U[] original, int from, int to, Class<? extends T[]> newType)
     
    static boolean
    deepEquals​(Object[] a1, Object[] a2)
     
    static int
     
    static String
     
    static boolean
    equals​(boolean[] a, boolean[] a2)
     
    static boolean
    equals​(byte[] a, byte[] a2)
     
    static boolean
    equals​(char[] a, char[] a2)
     
    static boolean
    equals​(double[] a, double[] a2)
     
    static boolean
    equals​(float[] a, float[] a2)
     
    static boolean
    equals​(int[] a, int[] a2)
     
    static boolean
    equals​(long[] a, long[] a2)
     
    static boolean
    equals​(short[] a, short[] a2)
     
    static boolean
    equals​(Object[] a, Object[] a2)
     
    static void
    fill​(boolean[] a, boolean val)
     
    static void
    fill​(boolean[] a, int fromIndex, int toIndex, boolean val)
     
    static void
    fill​(byte[] a, byte val)
     
    static void
    fill​(byte[] a, int fromIndex, int toIndex, byte val)
     
    static void
    fill​(char[] a, char val)
     
    static void
    fill​(char[] a, int fromIndex, int toIndex, char val)
     
    static void
    fill​(double[] a, double val)
     
    static void
    fill​(double[] a, int fromIndex, int toIndex, double val)
     
    static void
    fill​(float[] a, float val)
     
    static void
    fill​(float[] a, int fromIndex, int toIndex, float val)
     
    static void
    fill​(int[] a, int val)
     
    static void
    fill​(int[] a, int fromIndex, int toIndex, int val)
     
    static void
    fill​(long[] a, int fromIndex, int toIndex, long val)
     
    static void
    fill​(long[] a, long val)
     
    static void
    fill​(short[] a, int fromIndex, int toIndex, short val)
     
    static void
    fill​(short[] a, short val)
     
    static void
    fill​(TObject[] a, int fromIndex, int toIndex, TObject val)
     
    static void
    fill​(TObject[] a, TObject val)
     
    static int
    hashCode​(boolean[] a)
     
    static int
    hashCode​(byte[] a)
     
    static int
    hashCode​(char[] a)
     
    static int
    hashCode​(double[] a)
     
    static int
    hashCode​(float[] a)
     
    static int
    hashCode​(int[] a)
     
    static int
    hashCode​(long[] a)
     
    static int
    hashCode​(short[] a)
     
    static int
    hashCode​(Object[] a)
     
    static void
    setAll​(double[] array, IntToDoubleFunction generator)
     
    static void
    setAll​(int[] array, IntUnaryOperator generator)
     
    static void
    setAll​(long[] array, IntToLongFunction generator)
     
    static <T> void
    setAll​(T[] array, IntFunction<? extends T> generator)
     
    static void
    sort​(byte[] a)
     
    static void
    sort​(byte[] a, int fromIndex, int toIndex)
     
    static void
    sort​(char[] a)
     
    static void
    sort​(char[] a, int fromIndex, int toIndex)
     
    static void
    sort​(double[] a)
     
    static void
    sort​(double[] a, int fromIndex, int toIndex)
     
    static void
    sort​(float[] a)
     
    static void
    sort​(float[] a, int fromIndex, int toIndex)
     
    static void
    sort​(int[] a)
     
    static void
    sort​(int[] a, int fromIndex, int toIndex)
     
    static void
    sort​(long[] a)
     
    static void
    sort​(long[] a, int fromIndex, int toIndex)
     
    static void
    sort​(short[] a)
     
    static void
    sort​(short[] a, int fromIndex, int toIndex)
     
    static void
    sort​(Object[] a)
     
    static void
    sort​(Object[] a, int fromIndex, int toIndex)
     
    static <T> void
    sort​(T[] a, int fromIndex, int toIndex, TComparator<? super T> c)
     
    static <T> void
    sort​(T[] a, TComparator<? super T> c)
     
    stream​(double[] array)
     
    stream​(double[] array, int startInclusive, int endExclusive)
     
    static TIntStream
    stream​(int[] array)
     
    static TIntStream
    stream​(int[] array, int startInclusive, int endExclusive)
     
    stream​(long[] array)
     
    stream​(long[] array, int startInclusive, int endExclusive)
     
    static <T> TStream<T>
    stream​(T[] array)
     
    static <T> TStream<T>
    stream​(T[] array, int startInclusive, int endExclusive)
     
    static String
    toString​(boolean[] a)
     
    static String
    toString​(byte[] a)
     
    static String
    toString​(char[] a)
     
    static String
    toString​(double[] a)
     
    static String
    toString​(float[] a)
     
    static String
    toString​(int[] a)
     
    static String
    toString​(long[] a)
     
    static String
    toString​(short[] a)
     
    static String
    toString​(TObject[] a)
     

    Methods inherited from class org.teavm.classlib.java.lang.TObject

    clone, equals, equals0, finalize, getClass0, hashCode, notify0, notifyAll0, toString, wait0, wait0, waitImpl

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TArrays

      public TArrays()
  • Method Details

    • copyOf

      public static char[] copyOf(char[] array, int length)
    • copyOf

      public static byte[] copyOf(byte[] array, int length)
    • copyOf

      public static short[] copyOf(short[] array, int length)
    • copyOf

      public static int[] copyOf(int[] array, int length)
    • copyOf

      public static long[] copyOf(long[] array, int length)
    • copyOf

      public static float[] copyOf(float[] array, int length)
    • copyOf

      public static double[] copyOf(double[] array, int length)
    • copyOf

      public static boolean[] copyOf(boolean[] array, int length)
    • copyOf

      public static <T> T[] copyOf(T[] original, int newLength)
    • copyOf

      public static <T,​ U> T[] copyOf(U[] original, int newLength, Class<? extends T[]> cls)
    • copyOfRange

      public static boolean[] copyOfRange(boolean[] array, int from, int to)
    • copyOfRange

      public static byte[] copyOfRange(byte[] array, int from, int to)
    • copyOfRange

      public static char[] copyOfRange(char[] array, int from, int to)
    • copyOfRange

      public static short[] copyOfRange(short[] array, int from, int to)
    • copyOfRange

      public static int[] copyOfRange(int[] array, int from, int to)
    • copyOfRange

      public static long[] copyOfRange(long[] array, int from, int to)
    • copyOfRange

      public static float[] copyOfRange(float[] array, int from, int to)
    • copyOfRange

      public static double[] copyOfRange(double[] array, int from, int to)
    • copyOfRange

      public static <T> T[] copyOfRange(T[] original, int from, int to)
    • copyOfRange

      public static <T,​ U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType)
    • toString

      public static String toString(TObject[] a)
    • toString

      public static String toString(boolean[] a)
    • toString

      public static String toString(byte[] a)
    • toString

      public static String toString(short[] a)
    • toString

      public static String toString(char[] a)
    • toString

      public static String toString(int[] a)
    • toString

      public static String toString(long[] a)
    • toString

      public static String toString(float[] a)
    • toString

      public static String toString(double[] a)
    • fill

      public static void fill(long[] a, int fromIndex, int toIndex, long val)
    • fill

      public static void fill(long[] a, long val)
    • fill

      public static void fill(int[] a, int fromIndex, int toIndex, int val)
    • fill

      public static void fill(int[] a, int val)
    • fill

      public static void fill(short[] a, int fromIndex, int toIndex, short val)
    • fill

      public static void fill(short[] a, short val)
    • fill

      public static void fill(char[] a, int fromIndex, int toIndex, char val)
    • fill

      public static void fill(char[] a, char val)
    • fill

      public static void fill(byte[] a, int fromIndex, int toIndex, byte val)
    • fill

      public static void fill(byte[] a, byte val)
    • fill

      public static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)
    • fill

      public static void fill(boolean[] a, boolean val)
    • fill

      public static void fill(float[] a, int fromIndex, int toIndex, float val)
    • fill

      public static void fill(float[] a, float val)
    • fill

      public static void fill(double[] a, int fromIndex, int toIndex, double val)
    • fill

      public static void fill(double[] a, double val)
    • fill

      public static void fill(TObject[] a, int fromIndex, int toIndex, TObject val)
    • fill

      public static void fill(TObject[] a, TObject val)
    • sort

      public static void sort(int[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(int[] a)
    • sort

      public static void sort(long[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(long[] a)
    • sort

      public static void sort(short[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(short[] a)
    • sort

      public static void sort(char[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(char[] a)
    • sort

      public static void sort(byte[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(byte[] a)
    • sort

      public static void sort(float[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(float[] a)
    • sort

      public static void sort(double[] a, int fromIndex, int toIndex)
    • sort

      public static void sort(double[] a)
    • sort

      public static void sort(Object[] a)
    • sort

      public static void sort(Object[] a, int fromIndex, int toIndex)
    • sort

      public static <T> void sort(T[] a, int fromIndex, int toIndex, TComparator<? super T> c)
    • sort

      public static <T> void sort(T[] a, TComparator<? super T> c)
    • binarySearch

      public static int binarySearch(int[] a, int key)
    • binarySearch

      public static int binarySearch(int[] a, int fromIndex, int toIndex, int key)
    • binarySearch

      public static int binarySearch(long[] a, long key)
    • binarySearch

      public static int binarySearch(long[] a, int fromIndex, int toIndex, long key)
    • binarySearch

      public static int binarySearch(short[] a, short key)
    • binarySearch

      public static int binarySearch(short[] a, int fromIndex, int toIndex, short key)
    • binarySearch

      public static int binarySearch(char[] a, char key)
    • binarySearch

      public static int binarySearch(char[] a, int fromIndex, int toIndex, char key)
    • binarySearch

      public static int binarySearch(byte[] a, byte key)
    • binarySearch

      public static int binarySearch(byte[] a, int fromIndex, int toIndex, byte key)
    • binarySearch

      public static int binarySearch(double[] a, double key)
    • binarySearch

      public static int binarySearch(double[] a, int fromIndex, int toIndex, double key)
    • binarySearch

      public static int binarySearch(float[] a, float key)
    • binarySearch

      public static int binarySearch(float[] a, int fromIndex, int toIndex, float key)
    • binarySearch

      public static int binarySearch(Object[] a, Object key)
    • binarySearch

      public static int binarySearch(Object[] a, int fromIndex, int toIndex, Object key)
    • binarySearch

      public static <T> int binarySearch(T[] a, T key, TComparator<? super T> c)
    • binarySearch

      public static <T> int binarySearch(T[] a, int fromIndex, int toIndex, T key, TComparator<? super T> c)
    • equals

      public static boolean equals(long[] a, long[] a2)
    • equals

      public static boolean equals(int[] a, int[] a2)
    • equals

      public static boolean equals(short[] a, short[] a2)
    • equals

      public static boolean equals(char[] a, char[] a2)
    • equals

      public static boolean equals(byte[] a, byte[] a2)
    • equals

      public static boolean equals(float[] a, float[] a2)
    • equals

      public static boolean equals(double[] a, double[] a2)
    • equals

      public static boolean equals(boolean[] a, boolean[] a2)
    • equals

      public static boolean equals(Object[] a, Object[] a2)
    • hashCode

      public static int hashCode(boolean[] a)
    • hashCode

      public static int hashCode(long[] a)
    • hashCode

      public static int hashCode(int[] a)
    • hashCode

      public static int hashCode(byte[] a)
    • hashCode

      public static int hashCode(short[] a)
    • hashCode

      public static int hashCode(char[] a)
    • hashCode

      public static int hashCode(float[] a)
    • hashCode

      public static int hashCode(double[] a)
    • hashCode

      public static int hashCode(Object[] a)
    • deepHashCode

      public static int deepHashCode(Object[] a)
    • deepEquals

      public static boolean deepEquals(Object[] a1, Object[] a2)
    • asList

      @SafeVarargs public static <T> TList<T> asList(T... a)
    • deepToString

      public static String deepToString(Object[] a)
    • stream

      public static <T> TStream<T> stream(T[] array)
    • stream

      public static <T> TStream<T> stream(T[] array, int startInclusive, int endExclusive)
    • stream

      public static TIntStream stream(int[] array)
    • stream

      public static TIntStream stream(int[] array, int startInclusive, int endExclusive)
    • stream

      public static TLongStream stream(long[] array)
    • stream

      public static TLongStream stream(long[] array, int startInclusive, int endExclusive)
    • stream

      public static TDoubleStream stream(double[] array)
    • stream

      public static TDoubleStream stream(double[] array, int startInclusive, int endExclusive)
    • setAll

      public static <T> void setAll(T[] array, IntFunction<? extends T> generator)
    • setAll

      public static void setAll(int[] array, IntUnaryOperator generator)
    • setAll

      public static void setAll(long[] array, IntToLongFunction generator)
    • setAll

      public static void setAll(double[] array, IntToDoubleFunction generator)