Imported GNU Classpath 0.19 + gcj-import-20051115.

* sources.am: Regenerated.
       * Makefile.in: Likewise.
       * scripts/makemake.tcl: Use glob -nocomplain.

From-SVN: r107049
This commit is contained in:
Mark Wielaard 2005-11-15 23:20:01 +00:00
parent 02e549bfaa
commit 8f523f3a10
1241 changed files with 97711 additions and 25284 deletions

View file

@ -2352,6 +2352,186 @@ public class Arrays
return new Arrays.ArrayList(a);
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (long[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (int[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (short[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (char[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (byte[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (boolean[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (float[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (double[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Returns a String representation of the argument array. Returns "null"
* if <code>a</code> is null.
* @param a the array to represent
* @return a String representing this array
* @since 1.5
*/
public static String toString (Object[] a)
{
if (a == null)
return "null";
if (a.length == 0)
return "[]";
String result = "[";
for (int i = 0; i < a.length - 1; i++)
result += String.valueOf(a[i]) + ", ";
result += String.valueOf(a[a.length - 1]) + "]";
return result;
}
/**
* Inner class used by {@link #asList(Object[])} to provide a list interface
* to an array. The name, though it clashes with java.util.ArrayList, is