org.apache.commons.lang
クラス ArrayUtils

java.lang.Object
  拡張org.apache.commons.lang.ArrayUtils

public class ArrayUtils
extends Object

配列、 (int[] のような)プリミティブ型の配列、 (Integer[] のような)プリミティブ型のラッパーの配列に対する処理です。

Operations on arrays, primitive arrays (like int[]) and primitive wrapper arrays (like Integer[]).

このクラスは null の入力を問題なく扱えるよう試みます。 null の配列が入力されれも冷害は発生しません。 しかし、null の要素をもつ Object の配列が渡された場合には例外を投げます。 各メソッドのドキュメントに各動作が記載されています。

This class tries to handle null input gracefully. An exception will not be thrown for a null array input. However, an Object array that contains a null element may throw an exception. Each method documents its behaviour.

導入されたバージョン:
2.0
バージョン:
$Id: ArrayUtils.java,v 1.1.1.1 2004/02/13 10:02:05 hioki Exp $
作成者:
Stephen Colebourne, Moritz Petersen, Fredrik Westermarck, Nikolay Metchev, Matthew Hawthorne, Tim O'Brien, Pete Gieser, Gary Gregory
翻訳者:
日置 聡
翻訳状況:
初稿(校正者募集中)
翻訳更新日:
2003/09/23

フィールドの概要
static boolean[] EMPTY_BOOLEAN_ARRAY
          不変(immutable)な boolean の空の配列です。
static Boolean[] EMPTY_BOOLEAN_OBJECT_ARRAY
          不変(immutable)な Boolean の空の配列です。
static byte[] EMPTY_BYTE_ARRAY
          不変(immutable)な byte の空の配列です。
static Byte[] EMPTY_BYTE_OBJECT_ARRAY
          不変(immutable)な Byte の空の配列です。
static char[] EMPTY_CHAR_ARRAY
          不変(immutable)な char の空の配列です。
static Character[] EMPTY_CHARACTER_OBJECT_ARRAY
          不変(immutable)な Character の空の配列です。
static Class[] EMPTY_CLASS_ARRAY
          不変(immutable)な Class の空の配列です。
static double[] EMPTY_DOUBLE_ARRAY
          不変(immutable)な double の空の配列です。
static Double[] EMPTY_DOUBLE_OBJECT_ARRAY
          不変(immutable)な Double の空の配列です。
static float[] EMPTY_FLOAT_ARRAY
          不変(immutable)な float の空の配列です。
static Float[] EMPTY_FLOAT_OBJECT_ARRAY
          不変(immutable)な Float の空の配列です。
static int[] EMPTY_INT_ARRAY
          不変(immutable)な int の空の配列です。
static Integer[] EMPTY_INTEGER_OBJECT_ARRAY
          不変(immutable)な Integer の空の配列です。
static long[] EMPTY_LONG_ARRAY
          不変(immutable)な long の空の配列です。
static Long[] EMPTY_LONG_OBJECT_ARRAY
          不変(immutable)な Long の空の配列です。
static Object[] EMPTY_OBJECT_ARRAY
          不変(immutable)な Object の空の配列です。
static short[] EMPTY_SHORT_ARRAY
          不変(immutable)な short の空の配列です。
static Short[] EMPTY_SHORT_OBJECT_ARRAY
          不変(immutable)な Short の空の配列です。
static String[] EMPTY_STRING_ARRAY
          不変(immutable)な String の空の配列です。
 
コンストラクタの概要
ArrayUtils()
          ArrayUtils のインスタンスは一般的なプログラムからは生成すべきではありません。
 
メソッドの概要
static boolean[] clone(boolean[] array)
          配列のクローンを生成して返します(null も処理します)。
static byte[] clone(byte[] array)
          配列のクローンを生成して返します(null も処理します)。
static char[] clone(char[] array)
          配列のクローンを生成して返します(null も処理します)。
static double[] clone(double[] array)
          配列のクローンを生成して返します(null も処理します)。
static float[] clone(float[] array)
          配列のクローンを生成して返します(null も処理します)。
static int[] clone(int[] array)
          配列のクローンを生成して返します(null も処理します)。
static long[] clone(long[] array)
          配列のクローンを生成して返します(null も処理します)。
static Object[] clone(Object[] array)
          配列のクローンを生成して返します(null も処理します)。
static short[] clone(short[] array)
          配列のクローンを生成して返します(null も処理します)。
static boolean contains(boolean[] array, boolean valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(byte[] array, byte valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(double[] array, double valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(double[] array, double valueToFind, double tolerance)
          指定された値と指定された誤差に該当する値がこの配列内に含まれているかどうかチェックします。
static boolean contains(float[] array, float valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(int[] array, int valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(long[] array, long valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static boolean contains(Object[] array, Object objectToFind)
          指定されたオブジェクトがこの配列内に含まれているかどうかチェックします。
static boolean contains(short[] array, short valueToFind)
          指定された値がこの配列内に含まれているかどうかチェックします。
static int hashCode(Object array)
          配列のハッシュコードを取得します。
static int indexOf(boolean[] array, boolean valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(boolean[] array, boolean valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(byte[] array, byte valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(byte[] array, byte valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(double[] array, double valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(double[] array, double valueToFind, double tolerance)
          配列の中から指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。
static int indexOf(double[] array, double valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(double[] array, double valueToFind, int startIndex, double tolerance)
          配列の中の指定されたインデックスより後ろから指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。
static int indexOf(float[] array, float valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(float[] array, float valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(int[] array, int valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(int[] array, int valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(long[] array, long valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(long[] array, long valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static int indexOf(Object[] array, Object objectToFind)
          配列の中から指定されたオブジェクトを探し、そのインデックスを返します。
static int indexOf(Object[] array, Object objectToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定されたオブジェクトを探し、そのインデックスを返します。
static int indexOf(short[] array, short valueToFind)
          配列の中から指定された値を探し、そのインデックスを返します。
static int indexOf(short[] array, short valueToFind, int startIndex)
          配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。
static boolean isEquals(Object array1, Object array2)
          equals() を使用して配列を比較します。
static boolean isSameLength(boolean[] array1, boolean[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(byte[] array1, byte[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(char[] array1, char[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(double[] array1, double[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(float[] array1, float[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(int[] array1, int[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(long[] array1, long[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(Object[] array1, Object[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameLength(short[] array1, short[] array2)
          2つの配列の長さが同じであるかどうかをチェックします。
static boolean isSameType(Object array1, Object array2)
          2つの配列の型と次元宣言が等しいかどうかをチェックします。
static int lastIndexOf(boolean[] array, boolean valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(boolean[] array, boolean valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(byte[] array, byte valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(byte[] array, byte valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(double[] array, double valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(double[] array, double valueToFind, double tolerance)
          配列の後ろから順に指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。
static int lastIndexOf(double[] array, double valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(double[] array, double valueToFind, int startIndex, double tolerance)
          配列の中の指定されたインデックスから前方に向かって指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。
static int lastIndexOf(float[] array, float valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(float[] array, float valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(int[] array, int valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(int[] array, int valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(long[] array, long valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(long[] array, long valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static int lastIndexOf(Object[] array, Object objectToFind)
          配列の後ろから順に指定されたオブジェクトを探し、そのインデックスを返します。
static int lastIndexOf(Object[] array, Object objectToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定されたオブジェクトを探し、そのインデックスを返します。
static int lastIndexOf(short[] array, short valueToFind)
          配列の後ろから順に指定された値を探し、そのインデックスを返します。
static int lastIndexOf(short[] array, short valueToFind, int startIndex)
          配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。
static void reverse(boolean[] array)
          渡された配列の並び順を逆にします。
static void reverse(byte[] array)
          渡された配列の並び順を逆にします。
static void reverse(char[] array)
          渡された配列の並び順を逆にします。
static void reverse(double[] array)
          渡された配列の並び順を逆にします。
static void reverse(float[] array)
          渡された配列の並び順を逆にします。
static void reverse(int[] array)
          渡された配列の並び順を逆にします。
static void reverse(long[] array)
          渡された配列の並び順を逆にします。
static void reverse(Object[] array)
          渡された配列の並び順を逆にします。
static void reverse(short[] array)
          渡された配列の並び順を逆にします。
static Map toMap(Object[] array)
          配列を Map に変換します。
static Boolean[] toObject(boolean[] array)
          boolean プリミティブ型の配列をオブジェクトの配列に変換します。
static Byte[] toObject(byte[] array)
          byte プリミティブ型の配列をオブジェクトの配列に変換します。
static Double[] toObject(double[] array)
          double プリミティブ型の配列をオブジェクトの配列に変換します。
static Float[] toObject(float[] array)
          float プリミティブ型の配列をオブジェクトの配列に変換します。
static Integer[] toObject(int[] array)
          int プリミティブ型の配列をオブジェクトの配列に変換します。
static Long[] toObject(long[] array)
          ling プリミティブ型の配列をオブジェクトの配列に変換します。
static Short[] toObject(short[] array)
          short プリミティブ型の配列をオブジェクトの配列に変換します。
static boolean[] toPrimitive(Boolean[] array)
          Boolean オブジェクトの配列をプリミティブ型の配列に変換します。
static boolean[] toPrimitive(Boolean[] array, boolean valueForNull)
          Boolean オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static byte[] toPrimitive(Byte[] array)
          Byte オブジェクトの配列をプリミティブ型の配列に変換します。
static byte[] toPrimitive(Byte[] array, byte valueForNull)
          Byte オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static double[] toPrimitive(Double[] array)
          Double オブジェクトの配列をプリミティブ型の配列に変換します。
static double[] toPrimitive(Double[] array, double valueForNull)
          Double オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static float[] toPrimitive(Float[] array)
          Float オブジェクトの配列をプリミティブ型の配列に変換します。
static float[] toPrimitive(Float[] array, float valueForNull)
          Float オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static int[] toPrimitive(Integer[] array)
          Integer オブジェクトの配列をプリミティブ型の配列に変換します。
static int[] toPrimitive(Integer[] array, int valueForNull)
          Integer オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static long[] toPrimitive(Long[] array)
          Long オブジェクトの配列をプリミティブ型の配列に変換します。
static long[] toPrimitive(Long[] array, long valueForNull)
          Long オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static short[] toPrimitive(Short[] array)
          Short オブジェクトの配列をプリミティブ型の配列に変換します。
static short[] toPrimitive(Short[] array, short valueForNull)
          Short オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。
static String toString(Object array)
          配列の文字列表現を返します。
static String toString(Object array, String stringIfNull)
          null が指定された場合にも正常に動作し、配列の文字列表現を返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

EMPTY_OBJECT_ARRAY

public static final Object[] EMPTY_OBJECT_ARRAY
不変(immutable)な Object の空の配列です。
An empty immutable Object array.


EMPTY_CLASS_ARRAY

public static final Class[] EMPTY_CLASS_ARRAY
不変(immutable)な Class の空の配列です。
An empty immutable Class array.


EMPTY_STRING_ARRAY

public static final String[] EMPTY_STRING_ARRAY
不変(immutable)な String の空の配列です。
An empty immutable String array.


EMPTY_LONG_ARRAY

public static final long[] EMPTY_LONG_ARRAY
不変(immutable)な long の空の配列です。
An empty immutable long array.


EMPTY_LONG_OBJECT_ARRAY

public static final Long[] EMPTY_LONG_OBJECT_ARRAY
不変(immutable)な Long の空の配列です。
An empty immutable Long array.


EMPTY_INT_ARRAY

public static final int[] EMPTY_INT_ARRAY
不変(immutable)な int の空の配列です。
An empty immutable int array.


EMPTY_INTEGER_OBJECT_ARRAY

public static final Integer[] EMPTY_INTEGER_OBJECT_ARRAY
不変(immutable)な Integer の空の配列です。
An empty immutable Integer array.


EMPTY_SHORT_ARRAY

public static final short[] EMPTY_SHORT_ARRAY
不変(immutable)な short の空の配列です。
An empty immutable short array.


EMPTY_SHORT_OBJECT_ARRAY

public static final Short[] EMPTY_SHORT_OBJECT_ARRAY
不変(immutable)な Short の空の配列です。
An empty immutable Short array.


EMPTY_BYTE_ARRAY

public static final byte[] EMPTY_BYTE_ARRAY
不変(immutable)な byte の空の配列です。
An empty immutable byte array.


EMPTY_BYTE_OBJECT_ARRAY

public static final Byte[] EMPTY_BYTE_OBJECT_ARRAY
不変(immutable)な Byte の空の配列です。
An empty immutable Byte array.


EMPTY_DOUBLE_ARRAY

public static final double[] EMPTY_DOUBLE_ARRAY
不変(immutable)な double の空の配列です。
An empty immutable double array.


EMPTY_DOUBLE_OBJECT_ARRAY

public static final Double[] EMPTY_DOUBLE_OBJECT_ARRAY
不変(immutable)な Double の空の配列です。
An empty immutable Double array.


EMPTY_FLOAT_ARRAY

public static final float[] EMPTY_FLOAT_ARRAY
不変(immutable)な float の空の配列です。
An empty immutable float array.


EMPTY_FLOAT_OBJECT_ARRAY

public static final Float[] EMPTY_FLOAT_OBJECT_ARRAY
不変(immutable)な Float の空の配列です。
An empty immutable Float array.


EMPTY_BOOLEAN_ARRAY

public static final boolean[] EMPTY_BOOLEAN_ARRAY
不変(immutable)な boolean の空の配列です。
An empty immutable boolean array.


EMPTY_BOOLEAN_OBJECT_ARRAY

public static final Boolean[] EMPTY_BOOLEAN_OBJECT_ARRAY
不変(immutable)な Boolean の空の配列です。
An empty immutable Boolean array.


EMPTY_CHAR_ARRAY

public static final char[] EMPTY_CHAR_ARRAY
不変(immutable)な char の空の配列です。
An empty immutable char array.


EMPTY_CHARACTER_OBJECT_ARRAY

public static final Character[] EMPTY_CHARACTER_OBJECT_ARRAY
不変(immutable)な Character の空の配列です。
An empty immutable Character array.

コンストラクタの詳細

ArrayUtils

public ArrayUtils()

ArrayUtils のインスタンスは一般的なプログラムからは生成すべきではありません。 代わりに ArrayUtils.clone(new int[] {2}) というように使用すべきです。

ArrayUtils instances should NOT be constructed in standard programming. Instead, the class should be used as ArrayUtils.clone(new int[] {2
).}

このコンストラクタは、処理のために JavaBean インスタンスを必要とするツールのために public になっています。

This constructor is public to permit tools that require a JavaBean instance to operate.

メソッドの詳細

toString

public static String toString(Object array)

配列の文字列表現を返します。null が指定された場合には空の配列として扱います。

Outputs an array as a String, treating null as an empty array.

多次元配列も正しく処理されます(プリミティブ型の多次元配列も)。

Multi-dimensional arrays are handled correctly, including multi-dimensional primitive arrays.

出力フォーマットは ({a,b} のような)Java のソースコードに近い形になります。

The format is that of Java source code, for example {a,b
.}

パラメータ:
array - 文字列表現を取得する配列、null を許容します
the array to get a toString for, may be null
戻り値:
配列の文字列表現、null の配列が指定された場合 '{}'
a String representation of the array, '{
' if null array input}

toString

public static String toString(Object array,
                              String stringIfNull)

null が指定された場合にも正常に動作し、配列の文字列表現を返します。

Outputs an array as a String handling nulls.

多次元配列も正しく処理されます(プリミティブ型の多次元配列も)。

Multi-dimensional arrays are handled correctly, including multi-dimensional primitive arrays.

出力フォーマットは ({a,b} のような)Java のソースコードに近い形になります。

The format is that of Java source code, for example {a,b
.}

パラメータ:
array - 文字列表現を取得する配列、null を許容します
the array to get a toString for, may be null
stringIfNull - 配列が null だった場合に返される文字列
the String to return if the array is null
戻り値:
配列の文字列表現
a String representation of the array

hashCode

public static int hashCode(Object array)

配列のハッシュコードを取得します。多次元配列も正しく処理されます。

Get a hashCode for an array handling multi-dimensional arrays correctly.

このメソッドはプリミティブ型の多次元配列も正しく処理します。

Multi-dimensional primitive arrays are also handled correctly by this method.

パラメータ:
array - ハッシュコードをを取得する配列、null を許容します
the array to get a hashCode for, may be null
戻り値:
配列のハッシュコード、null の場合には0
a hashCode for the array, zero if null array input

isEquals

public static boolean isEquals(Object array1,
                               Object array2)

equals() を使用して配列を比較します。多次元配列も正しく処理されます。

Compares two arrays, using equals(), handling multi-dimensional arrays correctly.

このメソッドはプリミティブ型の多次元配列も正しく処理します。

Multi-dimensional primitive arrays are also handled correctly by this method.

パラメータ:
array1 - ハッシュコードをを取得する配列、null を許容します
the array to get a hashCode for, may be null
array2 - ハッシュコードをを取得する配列、null を許容します
the array to get a hashCode for, may be null
戻り値:
配列が等しい場合、true
true if the arrays are equal

toMap

public static Map toMap(Object[] array)

配列を Map に変換します。配列の各要素は Map.Entry または2つ以上の要素を持つ配列(1つ目の要素がキー、2つ目の要素が値になります)でなくてはなりません。

Converts the given array into a {@link java.util.Map}. Each element of the array must be either a {@link java.util.Map.Entry} or an Array, containing at least two elements, where the first element is used as key and the second as value.

このメソッドは以下のような初期化処理に使用することが出来ます: {@primary This method can be used to initialize:}

 // Create a Map mapping colors.
 Map colorMap = MapUtils.toMap(new String[][] {{
     {"RED", "#FF0000"
, {"GREEN", "#00FF00"}, {"BLUE", "#0000FF"}});

このメソッドは null の配列が指定された場合には null を返します。

This method returns null if null array input.

パラメータ:
array - Map.Entry または2つ以上の要素をもつ配列を要素に持つ配列、 null を許容します
an array whose elements are either a {@link java.util.Map.Entry} or an Array containing at least two elements, may be null
戻り値:
配列から生成された Map
a Map that was created from the array
例外:
IllegalArgumentException - 配列の要素が配列だった場合に要素数が2よりも少なかった場合
if one element of this Array is itself an Array containing less then two elements
IllegalArgumentException - 配列の要素が Map.Entry または配列以外だった場合
if the array contains elements other than {@link java.util.Map.Entry} and an Array

clone

public static Object[] clone(Object[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static long[] clone(long[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static int[] clone(int[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static short[] clone(short[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static char[] clone(char[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static byte[] clone(byte[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static double[] clone(double[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static float[] clone(float[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

clone

public static boolean[] clone(boolean[] array)

配列のクローンを生成して返します(null も処理します)。

Clones an array returning a typecast result and handling null.

This method returns null if null array input.

パラメータ:
array - null を許容する配列
the array to clone, may be null
戻り値:
クローンされた配列、null が指定された場合には null
the cloned array, null if null input

isSameLength

public static boolean isSameLength(Object[] array1,
                                   Object[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(long[] array1,
                                   long[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(int[] array1,
                                   int[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(short[] array1,
                                   short[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(char[] array1,
                                   char[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(byte[] array1,
                                   byte[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(double[] array1,
                                   double[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(float[] array1,
                                   float[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameLength

public static boolean isSameLength(boolean[] array1,
                                   boolean[] array2)

2つの配列の長さが同じであるかどうかをチェックします。 null の配列の長さは0とみなされます。

Checks whether two arrays are the same length, treating null arrays as length 0.

配列の多次元要素は無視されます。

Any multi-dimensional aspects of the arrays are ignored.

パラメータ:
array1 - 1つ目の配列、null を許容します
the first array, may be null
array2 - 2つ目の配列、null を許容します
the second array, may be null
戻り値:
配列の長さが等しい場合 truenull は空の配列とみなされます
true if length of arrays matches, treating null as an empty array

isSameType

public static boolean isSameType(Object array1,
                                 Object array2)

2つの配列の型と次元宣言が等しいかどうかをチェックします。

Checks whether two arrays are the same type taking into account multi-dimensional arrays.

パラメータ:
array1 - 1つ目の配列、null を許容しません
the first array, must not be null
array2 - 2つ目の配列、null を許容しません
the second array, must not be null
戻り値:
2つの配列が同じ宣言の場合 true
true if type of arrays matches
例外:
IllegalArgumentException - どちらかの配列が null の場合
if either array is null

reverse

public static void reverse(Object[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

多次元配列を考慮した処理は行われません。

There is no special handling for multi-dimensional arrays.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(long[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(int[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(short[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(char[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(byte[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(double[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(float[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

reverse

public static void reverse(boolean[] array)

渡された配列の並び順を逆にします。

Reverses the order of the given array.

このメソッドは null の配列が渡された場合、何もしません。

This method does nothing if null array input.

パラメータ:
array - 配列の並び順を逆にする配列、null を許容します
the array to reverse, may be null

indexOf

public static int indexOf(Object[] array,
                          Object objectToFind)

配列の中から指定されたオブジェクトを探し、そのインデックスを返します。

Find the index of the given object in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - オブジェクトを検索する対象となる配列、null を許容します
the array to search through for the object, may be null
objectToFind - 検索するオブジェクト、null を許容します
the object to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the object within the array, -1 if not found or null array input

indexOf

public static int indexOf(Object[] array,
                          Object objectToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定されたオブジェクトを探し、そのインデックスを返します。

Find the index of the given object in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - オブジェクトを検索する対象となる配列、null を許容します
the array to search through for the object, may be null
objectToFind - 検索するオブジェクト、null を許容します
the object to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the object within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(Object[] array,
                              Object objectToFind)

配列の後ろから順に指定されたオブジェクトを探し、そのインデックスを返します。

Find the last index of the given object within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - オブジェクトを後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
objectToFind - 検索するオブジェクト、null を許容します
the object to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(Object[] array,
                              Object objectToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定されたオブジェクトを探し、そのインデックスを返します。

Find the last index of the given object in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - オブジェクトを後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
objectToFind - 検索するオブジェクト、null を許容します
the object to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(Object[] array,
                               Object objectToFind)

指定されたオブジェクトがこの配列内に含まれているかどうかチェックします。

Checks if the object is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
objectToFind - 検索対象となるオブジェクト
the object to find
戻り値:
配列が指定されたオブジェクトを含む場合、true
true if the array contains the object

indexOf

public static int indexOf(long[] array,
                          long valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(long[] array,
                          long valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(long[] array,
                              long valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(long[] array,
                              long valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(long[] array,
                               long valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

indexOf

public static int indexOf(int[] array,
                          int valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(int[] array,
                          int valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(int[] array,
                              int valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(int[] array,
                              int valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(int[] array,
                               int valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

indexOf

public static int indexOf(short[] array,
                          short valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(short[] array,
                          short valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(short[] array,
                              short valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(short[] array,
                              short valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(short[] array,
                               short valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

indexOf

public static int indexOf(byte[] array,
                          byte valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(byte[] array,
                          byte valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(byte[] array,
                              byte valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(byte[] array,
                              byte valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(byte[] array,
                               byte valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

indexOf

public static int indexOf(double[] array,
                          double valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(double[] array,
                          double valueToFind,
                          double tolerance)

配列の中から指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。 このメソッドは最初に見つかった valueToFind - tolerance と valueToFind + tolerance の範囲に該当する値のインデックスを返します。

Find the index of the given value within a given tolerance in the array. This method will return the index of the first value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値
the value to find
tolerance - 検索時の誤差
tolerance of the search
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(double[] array,
                          double valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(double[] array,
                          double valueToFind,
                          int startIndex,
                          double tolerance)

配列の中の指定されたインデックスより後ろから指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。 このメソッドは最初に見つかった valueToFind - tolerance と valueToFind + tolerance の範囲に該当する値のインデックスを返します。

Find the index of the given value in the array starting at the given index. This method will return the index of the first value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値
the value to find
startIndex - 検索を開始するインデックス
the index to start searching at
tolerance - 検索時の誤差
tolerance of the search
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(double[] array,
                              double valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(double[] array,
                              double valueToFind,
                              double tolerance)

配列の後ろから順に指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。 このメソッドは最後に見つかった valueToFind - tolerance と valueToFind + tolerance の範囲に該当する値のインデックスを返します。

Find the last index of the given value within a given tolerance in the array. This method will return the index of the last value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値
the value to find
tolerance - 検索時の誤差
tolerance of the search
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(double[] array,
                              double valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(double[] array,
                              double valueToFind,
                              int startIndex,
                              double tolerance)

配列の中の指定されたインデックスから前方に向かって指定された値と指定された誤差に該当するものを探し、そのインデックスを返します。 このメソッドは最後に見つかった valueToFind - tolerance と valueToFind + tolerance の範囲に該当する値のインデックスを返します。

Find the last index of the given value in the array starting at the given index. This method will return the index of the last value which falls between the region defined by valueToFind - tolerance and valueToFind + tolerance.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値
the value to find
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
tolerance - 検索対象の+/-の誤差の値
search for value within plus/minus this amount
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

contains

public static boolean contains(double[] array,
                               double valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

contains

public static boolean contains(double[] array,
                               double valueToFind,
                               double tolerance)

指定された値と指定された誤差に該当する値がこの配列内に含まれているかどうかチェックします。 配列が (value - tolerance) から (value + tolerance) の範囲に該当する値を含んでいた場合 true を返します。

Checks if a value falling within the given tolerance is in the given array. If the array contains a value within the inclusive range defined by (value - tolerance) to (value + tolerance).

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search
valueToFind - 検索対象となる値
the value to find
tolerance - 配列を検索する際の誤差
the array contains the tolerance of the search
戻り値:
配列が指定された誤差範囲の値を含む場合、true
true if value falling within tolerance is in array

indexOf

public static int indexOf(float[] array,
                          float valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(float[] array,
                          float valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(float[] array,
                              float valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(float[] array,
                              float valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(float[] array,
                               float valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

indexOf

public static int indexOf(boolean[] array,
                          boolean valueToFind)

配列の中から指定された値を探し、そのインデックスを返します。

Find the index of the given valie in the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

indexOf

public static int indexOf(boolean[] array,
                          boolean valueToFind,
                          int startIndex)

配列の中の指定されたインデックスより後ろから指定された値を探し、そのインデックスを返します。

Find the index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex の値は0とみなされます。 startIndex が配列の長さより大きい場合には -1 が返されます。

A negative startIndex is treated as zero. A startIndex larger than the array length will return -1.

パラメータ:
array - 値を検索する対象となる配列、null を許容します
the array to search through for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 検索を開始するインデックス
the index to start searching at
戻り値:
配列中の値のインデックス、見つからなかった場合、配列が null だった場合には -1
the index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(boolean[] array,
                              boolean valueToFind)

配列の後ろから順に指定された値を探し、そのインデックスを返します。

Find the last index of the given value within the array.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the valie within the array, -1 if not found or null array input

lastIndexOf

public static int lastIndexOf(boolean[] array,
                              boolean valueToFind,
                              int startIndex)

配列の中の指定されたインデックスから前方に向かって指定された値を探し、そのインデックスを返します。

Find the last index of the given value in the array starting at the given index.

このメソッドは null の配列が指定された場合 -1 を返します。

This method returns -1 if null array input.

マイナスの startIndex が指定された場合には -1 を返します。 startIndex が配列の長さより大きい場合には配列の一番後ろからの検索を行います。

A negative startIndex will return -1. A startIndex larger than the array length will search from the end of the array.

パラメータ:
array - 値を後ろから順に検索する対象となる配列、null を許容します
the array to travers backwords looking for the object, may be null
valueToFind - 検索する値、null を許容します
the valie to find, may be null
startIndex - 後ろから前への検索を開始するインデックス
the start index to travers backwards from
戻り値:
配列中のオブジェクトのインデックス、見つからなかった場合、配列が null だった場合には -1
the last index of the object within the array, -1 if not found or null array input

contains

public static boolean contains(boolean[] array,
                               boolean valueToFind)

指定された値がこの配列内に含まれているかどうかチェックします。

Checks if the value is in the given array.

null の配列が指定された場合、このメソッドは false を返します。

The method returns false if a null array is passed in.

パラメータ:
array - 検索先となる配列
the array to search through
valueToFind - 検索対象となる値
the value to find
戻り値:
配列が指定された値を含む場合、true
true if the array contains the object

toPrimitive

public static long[] toPrimitive(Long[] array)

Long オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Longs to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Long の配列、null を許容します
a Long array, may be null
戻り値:
long の配列、null の配列が指定された場合 null
a long array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static long[] toPrimitive(Long[] array,
                                 long valueForNull)

Long オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Long to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Long の配列、null を許容します
a Long array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
long の配列、null の配列が指定された場合 null
a long array, null if null array input

toObject

public static Long[] toObject(long[] array)

ling プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive longs to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - long の配列
a long array
戻り値:
Long の配列、null の配列が指定された場合 null
a Long array, null if null array input

toPrimitive

public static int[] toPrimitive(Integer[] array)

Integer オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Integers to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Integer の配列、null を許容します
an Integer array, may be null
戻り値:
int の配列、null の配列が指定された場合 null
an int array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static int[] toPrimitive(Integer[] array,
                                int valueForNull)

Integer オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Integer to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Integer の配列、null を許容します
a Integer array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
int の配列、null の配列が指定された場合 null
an int array, null if null array input

toObject

public static Integer[] toObject(int[] array)

int プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive ints to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - int の配列
a int array
戻り値:
Integer の配列、null の配列が指定された場合 null
a Integer array, null if null array input

toPrimitive

public static short[] toPrimitive(Short[] array)

Short オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Shorts to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Short の配列、null を許容します
a Short array, may be null
戻り値:
short の配列、null の配列が指定された場合 null
a short array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static short[] toPrimitive(Short[] array,
                                  short valueForNull)

Short オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Short to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Short の配列、null を許容します
a Short array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
short の配列、null の配列が指定された場合 null
a short array, null if null array input

toObject

public static Short[] toObject(short[] array)

short プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive shorts to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - short の配列
a short array
戻り値:
Short の配列、null の配列が指定された場合 null
a Short array, null if null array input

toPrimitive

public static byte[] toPrimitive(Byte[] array)

Byte オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Bytes to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Byte の配列、null を許容します
a Byte array, may be null
戻り値:
byte の配列、null の配列が指定された場合 null
a byte array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static byte[] toPrimitive(Byte[] array,
                                 byte valueForNull)

Byte オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Byte to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Byte の配列、null を許容します
a Byte array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
byte の配列、null の配列が指定された場合 null
a byte array, null if null array input

toObject

public static Byte[] toObject(byte[] array)

byte プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive bytes to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - byte の配列
a byte array
戻り値:
Byte の配列、null の配列が指定された場合 null
a Byte array, null if null array input

toPrimitive

public static double[] toPrimitive(Double[] array)

Double オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Doubles to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Double の配列、null を許容します
a Double array, may be null
戻り値:
double の配列、null の配列が指定された場合 null
a double array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static double[] toPrimitive(Double[] array,
                                   double valueForNull)

Double オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Doubles to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Double の配列、null を許容します
a Double array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
double の配列、null の配列が指定された場合 null
a double array, null if null array input

toObject

public static Double[] toObject(double[] array)

double プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive doubles to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - double の配列
a double array
戻り値:
Double の配列、null の配列が指定された場合 null
a Double array, null if null array input

toPrimitive

public static float[] toPrimitive(Float[] array)

Float オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Floats to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Float の配列、null を許容します
a Float array, may be null
戻り値:
float の配列、null の配列が指定された場合 null
a float array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static float[] toPrimitive(Float[] array,
                                  float valueForNull)

Float オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Floats to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Float の配列、null を許容します
a Float array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
float の配列、null の配列が指定された場合 null
a float array, null if null array input

toObject

public static Float[] toObject(float[] array)

float プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive floats to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - float の配列
a float array
戻り値:
Float の配列、null の配列が指定された場合 null
a Float array, null if null array input

toPrimitive

public static boolean[] toPrimitive(Boolean[] array)

Boolean オブジェクトの配列をプリミティブ型の配列に変換します。

Converts an array of object Booleans to primitives.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Boolean の配列、null を許容します
a Boolean array, may be null
戻り値:
boolean の配列、null の配列が指定された場合 null
a boolean array, null if null array input
例外:
NullPointerException - 配列が nullの要素をもっていた場合
if array content is null

toPrimitive

public static boolean[] toPrimitive(Boolean[] array,
                                    boolean valueForNull)

Boolean オブジェクトの配列をプリミティブ型の配列に変換します(null の要素を処理します)。

Converts an array of object Booleans to primitives handling null.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - Boolean の配列、null を許容します
a Boolean array, may be null
valueForNull - null が見つかった場合に適用する値
the value to insert if null found
戻り値:
boolean の配列、null の配列が指定された場合 null
a boolean array, null if null array input

toObject

public static Boolean[] toObject(boolean[] array)

boolean プリミティブ型の配列をオブジェクトの配列に変換します。

Converts an array of primitive booleans to objects.

このメソッドは null の配列が指定された場合 null を返します。

This method returns null if null array input.

パラメータ:
array - boolean の配列
a boolean array
戻り値:
Boolean の配列、null の配列が指定された場合 null
a Boolean array, null if null array input


このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation