Revision: 28
http://svn.sourceforge.net/jcontracts/?rev=28&view=rev
Author: jstuyts
Date: 2006-11-27 08:50:03 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Formatted code.
Modified Paths:
--------------
trunk/source/java/net/sf/jcontracts/icontract/util/Array.java
Modified: trunk/source/java/net/sf/jcontracts/icontract/util/Array.java
===================================================================
--- trunk/source/java/net/sf/jcontracts/icontract/util/Array.java 2006-11-27 16:49:27 UTC (rev 27)
+++ trunk/source/java/net/sf/jcontracts/icontract/util/Array.java 2006-11-27 16:50:03 UTC (rev 28)
@@ -1,89 +1,108 @@
package net.sf.jcontracts.icontract.util;
+public class Array
+{
-public class Array {
+ private Array()
+ {
+ }
- private Array() {
- }
+ public static byte[] copy(byte orig[])
+ {
+ byte res[] = new byte[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static byte[] copy(byte orig[]) {
- byte res[] = new byte[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static char[] copy(char orig[])
+ {
+ char res[] = new char[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static char[] copy(char orig[]) {
- char res[] = new char[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static double[] copy(double orig[])
+ {
+ double res[] = new double[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static double[] copy(double orig[]) {
- double res[] = new double[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static float[] copy(float orig[])
+ {
+ float res[] = new float[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static float[] copy(float orig[]) {
- float res[] = new float[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static int[] copy(int orig[])
+ {
+ int res[] = new int[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static int[] copy(int orig[]) {
- int res[] = new int[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static long[] copy(long orig[])
+ {
+ long res[] = new long[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static long[] copy(long orig[]) {
- long res[] = new long[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static Object[] copy(Object orig[])
+ {
+ Object res[] = new Object[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static Object[] copy(Object orig[]) {
- Object res[] = new Object[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static short[] copy(short orig[])
+ {
+ short res[] = new short[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static short[] copy(short orig[]) {
- short res[] = new short[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
+ return res;
+ }
- return res;
- }
+ public static boolean[] copy(boolean orig[])
+ {
+ boolean res[] = new boolean[orig.length];
+ for (int i = 0; i < orig.length; i++)
+ {
+ res[i] = orig[i];
+ }
- public static boolean[] copy(boolean orig[]) {
- boolean res[] = new boolean[orig.length];
- for (int i = 0; i < orig.length; i++) {
- res[i] = orig[i];
- }
-
- return res;
- }
+ return res;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|