/** * Returns an unmodifiable view of the specified {@code list}. * * @param list * the list for which an unmodifiable view is to be returned. May not be <code>null</code>. * @return an unmodifiable view of the specified list. * @see Collections#unmodifiableList(List) */ @Inline(value="$2.$3unmodifiableList($1)", imported=Collections.class) public static <T> List<T> unmodifiableView(List<? extends T> list) { return Collections.unmodifiableList(list); }
/** * Returns an unmodifiable view of the specified sorted {@code map}. * * @param map * the sorted map for which an unmodifiable view is to be returned. May not be <code>null</code>. * @return an unmodifiable view of the specified sorted map. * @see Collections#unmodifiableSortedMap(SortedMap) */ @Inline(value="$2.$3unmodifiableSortedMap($1)", imported=Collections.class) public static <K, V> SortedMap<K, V> unmodifiableView(SortedMap<K, ? extends V> map) { return Collections.unmodifiableSortedMap(map); }
/** * Returns an immutable copy of the specified {@code list}. * * @param list * the list for which an immutable copy should be created. May not be <code>null</code>. * @return an immutable copy of the specified list. */ @Inline(value="$2.$3copyOf($1)", imported=ImmutableList.class) public static <T> List<T> immutableCopy(List<? extends T> list) { return ImmutableList.copyOf(list); }
/** * @param array * the array * @return the length of the given array */ @Pure @Inline("$1.length") public static int length(boolean[] array) { return array.length; }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static float get(float[] array, int index) { return array[index]; }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static long get(long[] array, int index) { return array[index]; }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static int get(int[] array, int index) { return array[index]; }
/** * @param array * the array * @return the length of the given array */ @Pure @Inline("$1.length") public static int length(byte[] array) { return array.length; }
/** * The postfix <code>decrement</code> operator. This is the equivalent to the Java's <code>--</code> postfix function. * * @param i an integer. * @return <code>i--</code> * @since 2.6 */ @Inline(value="$1--") public static Integer operator_minusMinus(Integer i) { throw new HardcodedInInterpreterException(); }
/** * @param size * the size for the array to be created * @return an array of the given size * @since 2.4 */ @Pure @Inline("new char[$1]") public static char[] newCharArrayOfSize(int size) { return new char[size]; }
/** * @param size * the size for the array to be created * @return an array of the given size * @since 2.4 */ @Pure @Inline("new double[$1]") public static double[] newDoubleArrayOfSize(int size) { return new double[size]; }
/** * @param size * the size for the array to be created * @return an array of the given size * @since 2.4 */ @Pure @Inline("new byte[$1]") public static byte[] newByteArrayOfSize(int size) { return new byte[size]; } }
/** * The postfix <code>increment</code> operator. This is the equivalent to the Java's <code>++</code> postfix function. * * @param c a character. * @return <code>c++</code> * @since 2.6 */ @Inline(value="$1++") public static char operator_plusPlus(char c) { throw new HardcodedInInterpreterException(); }
/** * The postfix <code>increment</code> operator. This is the equivalent to the Java's <code>++</code> postfix function. * * @param b a byte. * @return <code>b++</code> * @since 2.6 */ @Inline(value="$1++") public static byte operator_plusPlus(byte b) { throw new HardcodedInInterpreterException(); }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static boolean get(boolean[] array, int index) { return array[index]; }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static short get(short[] array, int index) { return array[index]; }
/** * @param array * the array * @param index * the index * @return the value at the given index */ @Pure @Inline("$1[$2]") public static byte get(byte[] array, int index) { return array[index]; }
/** * The postfix <code>increment</code> operator. This is the equivalent to the Java's <code>++</code> postfix function. * * @param i an integer. * @return <code>i++</code> * @since 2.6 */ @Inline(value="$1++") public static Integer operator_plusPlus(Integer i) { throw new HardcodedInInterpreterException(); } /**
/** * The postfix <code>increment</code> operator. This is the equivalent to the Java's <code>++</code> postfix function. * * @param l a long. * @return <code>l++</code> * @since 2.6 */ @Inline(value="$1++") public static long operator_plusPlus(long l) { throw new HardcodedInInterpreterException(); }
/** * The postfix <code>increment</code> operator. This is the equivalent to the Java's <code>++</code> postfix function. * * @param f a float. * @return <code>f++</code> * @since 2.6 */ @Inline(value="$1++") public static float operator_plusPlus(float f) { throw new HardcodedInInterpreterException(); }