Bug 1462 : add shuffle() methods
Last modified: 2010-02-16 13:37




Status:
ASSIGNED
Resolution:
-
Priority:
P4
Severity:
enhancement

 

Reporter:
antiplastik
Assigned To:
fry

Attachment Type Created Size Actions
shuffle() methods application/octet-stream 2010-02-14 04:46 3.15 KB

Description:   Opened: 2010-02-14 04:39
Shuffle lists and arrays, including primitive arrays.

See attached code.
Additional Comment #1 From antiplastik 2010-02-14 04:46
edit]
shuffle() methods

// Example
shuffle(myArray);
shuffle(myArray, myRandomSeed);
Additional Comment #2 From fry 2010-02-16 13:37
marking as a possible enhancement. for what it's worth, i currently lean
away from adding more array methods, since even the original methods that
are in there are less useful nowadays than they were during the Java 1.1
time when the API was designed. Arrays.xxxx() can handle a lot of the work,
as can the Collections classes in different forms, so we'd be more likely
to break this out as a separate library, along with other more advanced
data handling methods.

for instance, we're thinking about a set of classes for data structures
like lists of ints or String objects, for which we'd add methods like this,
rather than building out PApplet further.
This bug is now being tracked here.