Uses of Class
squidpony.squidmath.MultiKey
Package | Description |
---|---|
squidpony.squidmath |
Rarely-used data structures removed from squidlib-util and put in squidlib-extra in case they can be useful.
|
-
Uses of MultiKey in squidpony.squidmath
Methods in squidpony.squidmath that return MultiKey Modifier and Type Method Description MultiKey
MultiKey. alter(int which, Object past, Object future)
In the keyset specified bywhich
, 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, Object future)
In the keyset specified bywhich
, changes the key atindex
to another key,future
, if index is valid and future does not yet exist in that keyset.MultiKey
MultiKey. remove(int which, Object removing)
Removes a given Object key from the keyset specified by which, ifremoving
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, ifindex
is at least 0 and less thansize()
.MultiKey
MultiKey. reorder(int... ordering)
Reorders this MultiKey usingordering
, which have the same length as this MultiKey'ssize()
and can be generated withArrayTools.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 callingshuffle(IRNG)
), or made in some other way.MultiKey
MultiKey. shuffle(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.Methods in squidpony.squidmath with parameters of type MultiKey Modifier and Type Method Description boolean
MultiKey. putAll(MultiKey other)
Puts all unique keys inother
into this MultiKey, respecting other's ordering.Constructors in squidpony.squidmath with parameters of type MultiKey Constructor Description MultiKey(MultiKey other)