|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--marf.util.Arrays
Extension of java.util.Arrays
to allow copying array portions.
$Id: Arrays.java,v 1.15 2005/06/04 23:51:05 mokhov Exp $
Arrays
,
System.arraycopy(Object, int, Object, int, int)
Constructor Summary | |
protected |
Arrays()
TODO: should we allow it? For what reason? |
Method Summary | |
static java.util.Vector |
arrayToVector(double[] padData)
Converts array of doubles to Vector. |
static java.util.Vector |
arrayToVector(int[] paiData)
Converts array of ints to Vector. |
static java.util.List |
asList(java.lang.Object[] paoObjects)
Provides an array-of-objects-to-List bridge. |
static void |
copy(double[] padDestination,
double[] padSource,
int piHowMany)
Copies N double elements from source to destination. |
static void |
copy(double[] padDestination,
int piStartIndex,
double[] padSource)
Copies source to destination starting at certain index in the destination. |
static void |
copy(double[] padDestination,
int piStartIndex,
double[] padSource,
int piHowMany)
Copies N double elements from source to destination starting at certain index in the destination. |
static void |
copy(double[] padDestination,
int piDestinationStartIndex,
double[] padSource,
int piSourceStartIndex,
int piHowMany)
Copies N double elements from source to destination starting at certain index in the destination. |
static void |
copy(int[] paiDestination,
int[] paiSource,
int piHowMany)
Copies N int elements from source to destination. |
static void |
copy(java.lang.Object[] paoDestination,
int piDestinationStartIndex,
java.lang.Object[] paoSource,
int piSourceStartIndex,
int piHowMany)
Generic copy() routine based on System.arraycopy() . |
static void |
copy(java.lang.Object poDestination,
int piDestinationStartIndex,
java.lang.Object poSource,
int piSourceStartIndex,
int piHowMany)
Generic copy() routine based on System.arraycopy() . |
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(java.lang.Object[] a,
java.lang.Object[] a2)
|
static boolean |
equals(short[] a,
short[] 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(java.lang.Object[] a,
int fromIndex,
int toIndex,
java.lang.Object val)
|
static void |
fill(java.lang.Object[] a,
java.lang.Object val)
|
static void |
fill(short[] a,
int fromIndex,
int toIndex,
short val)
|
static void |
fill(short[] a,
short val)
|
static java.lang.String |
getRevision()
Returns source code revision information. |
static void |
sort(double[] padArrayToSort)
A wrapper of java.util.Arrays.sort(double[]). |
static void |
sort(java.lang.Object[] paoArrayToSort,
java.util.Comparator poComparator)
A wrapper of java.util.Arrays.sort(Object[], Comparator). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Arrays()
Method Detail |
public static void copy(java.lang.Object poDestination, int piDestinationStartIndex, java.lang.Object poSource, int piSourceStartIndex, int piHowMany)
copy()
routine based on System.arraycopy()
.
TODO: should I just keep this copy() to be consistent with our API?
poDestination
- destination array of copypiDestinationStartIndex
- where in the destination array start placing the valuespoSource
- source of elementspiSourceStartIndex
- where in the source array start copying the values frompiHowMany
- how many elements should be copied from the source to destinationpublic static void copy(java.lang.Object[] paoDestination, int piDestinationStartIndex, java.lang.Object[] paoSource, int piSourceStartIndex, int piHowMany)
copy()
routine based on System.arraycopy()
.
TODO: is it very much redundant?
paoDestination
- destination array of objects to copy topiDestinationStartIndex
- where in the destination array start placing the valuespaoSource
- source of Object elementspiSourceStartIndex
- where in the source array start copying the values frompiHowMany
- how many elements should be copied from the source to destinationpublic static void copy(double[] padDestination, int piDestinationStartIndex, double[] padSource, int piSourceStartIndex, int piHowMany)
System.arraycopy()
.
padDestination
- array to copy topiDestinationStartIndex
- starting index in the destination to start copying topadSource
- array of doubles to copy frompiSourceStartIndex
- starting index in the source to start copying frompiHowMany
- N; the number of elements to copy from the source to the destinationpublic static void copy(double[] padDestination, int piStartIndex, double[] padSource, int piHowMany)
padDestination
- array to copy topiStartIndex
- starting index in the destination to start copying topadSource
- array of doubles to copy frompiHowMany
- N; the number of elements to copy from the source to the destinationpublic static void copy(double[] padDestination, int piStartIndex, double[] padSource)
padDestination
- array to copy topiStartIndex
- starting index in the destination to start copying topadSource
- array of doubles to copy frompublic static void copy(double[] padDestination, double[] padSource, int piHowMany)
padDestination
- array to copy topadSource
- array of doubles to copy frompiHowMany
- N; the number of elements to copy from the source to the destinationpublic static void copy(int[] paiDestination, int[] paiSource, int piHowMany)
paiDestination
- array to copy topaiSource
- array of ints to copy frompiHowMany
- N; the number of elements to copy from the source to the destinationpublic static boolean equals(boolean[] a, boolean[] a2)
public static boolean equals(byte[] a, byte[] a2)
public static boolean equals(char[] a, char[] a2)
public static boolean equals(double[] a, double[] a2)
public static boolean equals(float[] a, float[] a2)
public static boolean equals(int[] a, int[] a2)
public static boolean equals(long[] a, long[] a2)
public static boolean equals(java.lang.Object[] a, java.lang.Object[] a2)
public static boolean equals(short[] a, short[] a2)
public static void fill(boolean[] a, boolean val)
public static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)
public static void fill(byte[] a, byte val)
public static void fill(byte[] a, int fromIndex, int toIndex, byte val)
public static void fill(char[] a, char val)
public static void fill(char[] a, int fromIndex, int toIndex, char val)
public static void fill(double[] a, double val)
public static void fill(double[] a, int fromIndex, int toIndex, double val)
public static void fill(float[] a, float val)
public static void fill(float[] a, int fromIndex, int toIndex, float val)
public static void fill(int[] a, int val)
public static void fill(int[] a, int fromIndex, int toIndex, int val)
public static void fill(long[] a, int fromIndex, int toIndex, long val)
public static void fill(long[] a, long val)
public static void fill(java.lang.Object[] a, int fromIndex, int toIndex, java.lang.Object val)
public static void fill(java.lang.Object[] a, java.lang.Object val)
public static void fill(short[] a, int fromIndex, int toIndex, short val)
public static void fill(short[] a, short val)
public static void sort(java.lang.Object[] paoArrayToSort, java.util.Comparator poComparator)
paoArrayToSort
- array of objects to sortpoComparator
- comparator object to use while sortingpublic static void sort(double[] padArrayToSort)
padArrayToSort
- array of doubles to sortpublic static java.util.Vector arrayToVector(double[] padData)
padData
- array of double data
public static java.util.Vector arrayToVector(int[] paiData)
paiData
- array of int data
public static java.util.List asList(java.lang.Object[] paoObjects)
java.util.Arrays.asList()
.
paoObjects
- array of objects
public static java.lang.String getRevision()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |