Package | Description |
---|---|
squidpony.squidmath |
Rarely-used data structures removed from squidlib-util and put in squidlib-extra in case they can be useful.
|
Modifier and Type | Method and Description |
---|---|
MultiKey |
MultiKey.alter(int which,
java.lang.Object past,
java.lang.Object future)
In the keyset specified by
which , changes an existing key, past , to another key, future ,
if past exists in that keyset and future does not yet exist in that keyset. |
MultiKey |
MultiKey.alterAt(int which,
int index,
java.lang.Object future)
In the keyset specified by
which , changes the key at index to another key, future , if
index is valid and future does not yet exist in that keyset. |
MultiKey |
MultiKey.remove(int which,
java.lang.Object removing)
Removes a given Object key from the keyset specified by which, if
removing exists in that keyset, and
also removes any keys associated with its point in the ordering. |
MultiKey |
MultiKey.removeAt(int index)
Removes a given point in the ordering, if
index is at least 0 and less than size() . |
MultiKey |
MultiKey.reorder(int... ordering)
Reorders this MultiKey using
ordering , which have the same length as this MultiKey's size()
and can be generated with ArrayTools.range(int) (which, if applied, would produce no
change to the current ordering), IRNG.randomOrdering(int) (which gives a random ordering, and if
applied immediately would be the same as calling shuffle(IRNG) ), or made in some other way. |
MultiKey |
MultiKey.shuffle(squidpony.squidmath.IRNG rng)
Generates a random ordering with rng and applies the same ordering to all kinds of keys this has; they will
maintain their current association to other keys but their ordering/indices will change.
|
Modifier and Type | Method and Description |
---|---|
boolean |
MultiKey.putAll(MultiKey other)
Puts all unique keys in
other into this MultiKey, respecting other's ordering. |
Constructor and Description |
---|
MultiKey(MultiKey other) |
Copyright © Eben Howard 2012–2022. All rights reserved.