|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dicom4j.core.utils.ArrayCopyUtilities
public abstract class ArrayCopyUtilities
A class of static methods for copying data between arrays of different types, expanding arrays, and comparing them, and removing padding from strings.
| Constructor Summary | |
|---|---|
ArrayCopyUtilities()
|
|
| Method Summary | |
|---|---|
static boolean |
arraysAreEqual(double[] a1,
double[] a2)
Compare two double arrays and return true if both not null, and are of equal length and contain equal values. |
static long[] |
copySignedIntToLongArray(int[] src)
Copy an array of signed values in int, into an array of long. |
static short[] |
copySignedIntToShortArray(int[] src)
Copy an array of signed values in int, into an array of short. |
static int[] |
copySignedShortToIntArray(short[] src)
Copy an array of signed values in short, into an array of int. |
static long[] |
copySignedShortToLongArray(short[] src)
Copy an array of signed values in short, into an array of long. |
static String[] |
copyStringArrayRemovingLeadingAndTrailingPadding(String[] src)
Copy a string removing leading and trailing padding. |
static double[] |
copyStringToDoubleArray(String[] src)
Extract decimal values from an array of strings into an array of double. |
static float[] |
copyStringToFloatArray(String[] src)
Extract decimal values from an array of strings into an array of float. |
static int[] |
copyStringToIntArray(String[] src)
Extract integer values from an array of strings into an array of int. |
static long[] |
copyStringToLongArray(String[] src)
Extract long values from an array of strings into an array of int. |
static long[] |
copyUnsignedIntToLongArray(int[] src)
Copy an array of unsigned values in int, into an array of long. |
static short[] |
copyUnsignedIntToShortArray(int[] src)
Copy an array of unsigned values in int, into an array of short. |
static int[] |
copyUnsignedShortToIntArray(short[] src)
Copy an array of unsigned values in short, into an array of int. |
static long[] |
copyUnsignedShortToLongArray(short[] src)
Copy an array of unsigned values in short, into an array of long. |
static double[] |
expandArray(double[] src)
Expand an array by adding one element to the end. |
static double[] |
expandArray(double[] src,
int expandBy)
Expand an array by adding elements to the end. |
static float[] |
expandArray(float[] src)
Expand an array by adding one element to the end. |
static float[] |
expandArray(float[] src,
int expandBy)
Expand an array by adding elements to the end. |
static int[] |
expandArray(int[] src)
Expand an array by adding one element to the end. |
static int[] |
expandArray(int[] src,
int expandBy)
Expand an array by adding elements to the end. |
static long[] |
expandArray(long[] src)
Expand an array by adding one element to the end. |
static long[] |
expandArray(long[] src,
int expandBy)
Expand an array by adding elements to the end. |
static short[] |
expandArray(short[] src)
Expand an array by adding one element to the end. |
static short[][] |
expandArray(short[][] src)
Expand an array by adding one element to the end. |
static short[][] |
expandArray(short[][] src,
int expandBy)
Expand an array by adding elements to the end. |
static short[] |
expandArray(short[] src,
int expandBy)
Expand an array by adding elements to the end. |
static String[] |
expandArray(String[] src)
Expand an array by adding one element to the end. |
static String[] |
expandArray(String[] src,
int expandBy)
Expand an array by adding elements to the end. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayCopyUtilities()
| Method Detail |
|---|
public static int[] copyUnsignedShortToIntArray(short[] src)
Copy an array of unsigned values in short, into an array of int.
Sign extension is prevented.
src - an array of short, whose values are interpreted as unsigned
public static int[] copySignedShortToIntArray(short[] src)
Copy an array of signed values in short, into an array of int.
Sign extension is performed.
src - an array of short, whose values are interpreted as signed
public static long[] copyUnsignedShortToLongArray(short[] src)
Copy an array of unsigned values in short, into an array of long.
Sign extension is prevented.
src - an array of short, whose values are interpreted as unsigned
public static long[] copySignedShortToLongArray(short[] src)
Copy an array of signed values in short, into an array of long.
Sign extension is performed.
src - an array of short, whose values are interpreted as signed
public static long[] copyUnsignedIntToLongArray(int[] src)
Copy an array of unsigned values in int, into an array of long.
Sign extension is prevented.
src - an array of int, whose values are interpreted as unsigned
public static long[] copySignedIntToLongArray(int[] src)
Copy an array of signed values in int, into an array of long.
Sign extension is performed.
src - an array of int, whose values are interpreted as signed
public static short[] copyUnsignedIntToShortArray(int[] src)
Copy an array of unsigned values in int, into an array of short.
The value is truncated as necessary.
src - an array of int
public static short[] copySignedIntToShortArray(int[] src)
Copy an array of signed values in int, into an array of short.
The value is truncated as necessary.
src - an array of int
public static String[] copyStringArrayRemovingLeadingAndTrailingPadding(String[] src)
Copy a string removing leading and trailing padding.
src - the padded value
public static int[] copyStringToIntArray(String[] src)
Extract integer values from an array of strings into an array of int.
Exceptions in the format of the string are trapped and 0 value(s) returned.
src - an array of strings, each of which should be an integer numeric value
public static long[] copyStringToLongArray(String[] src)
Extract long values from an array of strings into an array of int.
Exceptions in the format of the string are trapped and 0 value(s) returned.
src - an array of strings, each of which should be an long numeric value
public static float[] copyStringToFloatArray(String[] src)
Extract decimal values from an array of strings into an array of float.
Exceptions in the format of the string are trapped and 0 value(s) returned.
src - an array of strings, each of which should be a decimal numeric value
public static double[] copyStringToDoubleArray(String[] src)
Extract decimal values from an array of strings into an array of double.
Exceptions in the format of the string are trapped and 0 value(s) returned.
src - an array of strings, each of which should be a decimal numeric value
public static short[] expandArray(short[] src)
Expand an array by adding one element to the end.
src - an array
public static short[] expandArray(short[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static short[][] expandArray(short[][] src)
Expand an array by adding one element to the end.
src - an array
public static short[][] expandArray(short[][] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static int[] expandArray(int[] src)
Expand an array by adding one element to the end.
src - an array
public static int[] expandArray(int[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static long[] expandArray(long[] src)
Expand an array by adding one element to the end.
src - an array
public static long[] expandArray(long[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static float[] expandArray(float[] src)
Expand an array by adding one element to the end.
src - an array
public static float[] expandArray(float[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static double[] expandArray(double[] src)
Expand an array by adding one element to the end.
src - an array
public static double[] expandArray(double[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static String[] expandArray(String[] src)
Expand an array by adding one element to the end.
src - an array
public static String[] expandArray(String[] src,
int expandBy)
Expand an array by adding elements to the end.
src - an arrayexpandBy - the number of elements to add
public static boolean arraysAreEqual(double[] a1,
double[] a2)
Compare two double arrays and return true if both not null, and are of equal length and contain equal values.
a1 - a2 -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||