From 1d41ce55a575d31ecd47d85cbb79c22694372d4a Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 29 May 2002 18:00:04 +0000 Subject: [PATCH] replaced unused long[] version of shuffle with an Object[] version. git-svn-id: https://samskivert.googlecode.com/svn/trunk@764 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/ArrayUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/ArrayUtil.java b/projects/samskivert/src/java/com/samskivert/util/ArrayUtil.java index ec734c49..04185f7f 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ArrayUtil.java +++ b/projects/samskivert/src/java/com/samskivert/util/ArrayUtil.java @@ -1,5 +1,5 @@ // -// $Id: ArrayUtil.java,v 1.4 2002/05/29 00:08:17 shaper Exp $ +// $Id: ArrayUtil.java,v 1.5 2002/05/29 18:00:04 ray Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Walter Korman @@ -96,7 +96,7 @@ public class ArrayUtil * * @param values the array to shuffle. */ - public static void shuffle (long[] values) + public static void shuffle (Object[] values) { shuffle(values, 0, values.length); } @@ -109,14 +109,14 @@ public class ArrayUtil * @param offset the index at which to start shuffling elements. * @param length the number of elements to shuffle. */ - public static void shuffle (long[] values, int offset, int length) + public static void shuffle (Object[] values, int offset, int length) { // starting from the end of the specified region, repeatedly swap // the element in question with a random element previous to it // (in the specified region) up to and including itself for (int ii = offset + length - 1; ii > offset; ii--) { int idx = offset + _rnd.nextInt(ii - offset + 1); - long tmp = values[ii]; + Object tmp = values[ii]; values[ii] = values[idx]; values[idx] = tmp; }