Type: DmxMultiverse

From Waltz
Jump to navigation Jump to search

The DmxMultiverse type represents any number of addressed DmxUniverses. Each universe has a specific, unique, number that identifies it.

DmxMultiverse is technically a special-purpose type of Map which is keyed by a Number between 1 and positive infinity and who's value is a DmxUniverse.

Constructors

There are no constructors exposed by this type. DmxMultiverse objects can only be obtained from an ArtNet Input Node.

Collection Access

As DmxMultiverse is based upon the Map type, it has the same special treatment for getting and setting values using the bracket notation.

To set channel 42 to 70% of universe 77 in multiverse you would write:

multiverse[77][42] = 179;

Notice how we can chain together bracketed numbers to first ask for universe 77 and then access channel 42 in that universe.

To print the values from universe 42 in multiverse to the Console you would write:

print(multiverse[42]);

Parameters

There are no parameters exposed by this type.

Functions

Arguments Returns Details
clear() Void Clears all universes from this multiverse.
containsKey(number) Number number - The universe number for which to check. Boolean
containsValue(universe) DmxUniverse universe - The universe of values for which to check. Boolean Returns true if any universe matches, verbatim, the contents of the provided universe.
get(number) Number number - The universe to get from the multiverse. DmxUniverse Get the desired universe from the multiverse.
getOrDefault(number, defaultUniverse) Number number - The universe to get from the multiverse.

DmxUniverse universe - The universe to return if the desired universe number did not exist in the multiverse.

DmxUniverse Get the desired universe, or return the provided default universe if the desired universe was not present.
isEmpty() Boolean Returns true if there are no DmxUniverses in the multiverse, otherwise false.
put(number, universe) Number number - The universe to put in the multiverse.

DmxUniverse universe - The universe to put at the specified number.

DmxUniverse Insert the provided universe at the provided number.
putAll(multiverse) DmxMultiverse multiverse - A multiverse from which to insert universes. Void Inserts all the numbered multiverses from the provided DmxMultiverse into this multiverse.
putIfAbsent(number, universe) Number number - The universe to put in the multiverse.

DmxUniverse universe - The universe to put at the specified number.

DmxUniverse Inserts the provided universe at the provided number only if a universe is not already present.
remove(number) Number number - The universe number for the universe that should be removed. DmxUniverse Removes and returns the universe at the provided number.
remove(number, universe) Number number - The universe number that should be removed.

DmxUniverse universe - The universe currently at the provided universe number.

Boolean Removes the universe number provided only if the universe at that number is equal to the provided universe.
replace(number, universe) Number number - The universe number that should be replaced.

DmxUniverse universe - The universe that should replace the current universe at the provided number.

DmxUniverse Replace the provided universe number with the provided universe only if there is already a universe at the provided number.
replace(number, oldUniv, newUniv) Number number - The universe number that should be replaced.

DmxUniverse oldUniv - The universe currently expected at the universe number.

DmxUniverse newUniv - The universe that should replace the current universe at the provided number.

Boolean Replace the provided universe number with the provided universe only if there is already a universe at the provided number and that universe is equal to the provided old universe.
size() Number Returns the number channels in the universe. This should always be 512.
equals(multiverse) DmxMultiverse multiverse - A point against which to compare equality. Boolean Compares two universes to determine if they contain identical values for all 512 channels.
Types
Primitives Boolean · Number · String
Objects Color · Dimension · DmxMultiverse · DmxUniverse · LocalInterface · Material · Point · RemoteAddress/IP · Scene · Time · Touch
Node Specific NdiSource · WoControlCue · WoHitTestResult · WoTimeline
Collections List · List of Lists · Map · Varargs
Special Any · Consumer · Expression · Null · Void