Package com.softsynth.jmsl
Class MusicShape
java.lang.Object
com.softsynth.jmsl.MusicJob
com.softsynth.jmsl.MusicShape
- All Implemented Interfaces:
Composable
,DimensionNameSpace
,Playable
,java.lang.Cloneable
,java.lang.Runnable
- Direct Known Subclasses:
MidiNoteRecorder
,SabbathBrideMusicShape
public class MusicShape extends MusicJob implements java.lang.Cloneable, DimensionNameSpace
MusicShape - a MusicJob with an abstract array of data elements. Each data element is an array of
doubles. A MusicShape has any number of elements. Each element has the same number of dimensions
0..n, which can be named with human-friendly monikers (such as "duration", "pitch",
"loudness"...).
A MusicShape's Instrument is handed one element at a time. The interpretation of this element depends on the Instrument's Interpreter, which reads the array of doubles in a consistent way and generates some kind of meaningful event with it (ie sounding a MIDI note, doing some drawing, etc)
MusicShape is Composable, so it can be put in a JMSL hierarchy and launched.
A MusicShape's Instrument is handed one element at a time. The interpretation of this element depends on the Instrument's Interpreter, which reads the array of doubles in a consistent way and generates some kind of meaningful event with it (ie sounding a MIDI note, doing some drawing, etc)
MusicShape is Composable, so it can be put in a JMSL hierarchy and launched.
- Author:
- Phil Burk and Nick Didkovsky
-
Field Summary
Fields inherited from class com.softsynth.jmsl.MusicJob
repeatCount
-
Constructor Summary
Constructors Constructor Description MusicShape(int dimensions)
construct a new MusicShape with a Printing InstrumentMusicShape(DimensionNameSpace dimensionNameSpace)
construct a new MusicShape with same number of dimensions, names, and limits as sourceMusicShape(Instrument ins, int dimensions)
-
Method Summary
Modifier and Type Method Description void
add(double d0)
Add element with 1 dimensionvoid
add(double[] d)
Add an element to this MusicShape.void
add(double d0, double d1)
Add element with 2 dimensionsvoid
add(double d0, double d1, double d2)
Add element with 3 dimensionsvoid
add(double d0, double d1, double d2, double d3)
Add element with 4 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4)
Add element with 5 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5)
Add element with 6 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6)
Add element with 7 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7)
Add element with 8 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8)
Add element with 9 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9)
Add element with 10 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10)
Add element with 11 dimensionsvoid
add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10, double d11)
Add element with 12 dimensionsvoid
calcDimStats(int dim)
called automatically by calcStats(), calculates statistics for specified dimensionvoid
calcStats()
called automatically by print(), calculates statistics for each dimensiondouble
clipValDim(double value, int dim)
return value clipped to dimension's limitsjava.lang.Object
clone()
Clones contents of shape.void
convertTimeBaseDim(double srcTicksPerSec, double destTicksPerSec, int dim)
(srcTicksPerSec, destTicksPerSec, dim), recalculate all durations in specified dimensionvoid
copyDataFrom(MusicShape source)
Exact duplicate of double[] elements from source MusicShape to this MusicShape.void
copyDataFrom(java.util.Vector source)
Copy double[] elements from source Vector of double[] to this MusicShape.void
copyDimensionNameSpace(DimensionNameSpace source)
Copy dimension names, limits and defaults from source DimensionNameSpace to this MusicShapevoid
differentiate(double sum, int dim)
go from absolute to delta time, given sum and dimension.int
dimension()
returns how many dimensions a MusicShape hasjava.util.Enumeration
dimensionNames()
java.lang.String
dumpSource()
Generate Java source that would recreate this MusicShapevoid
dumpSource(java.io.PrintWriter pout)
Generate Java source that would recreate this MusicShape, write to a PrintWritervoid
dumpSource(java.lang.String filename)
Generate Java source that would recreate this MusicShape, write to a filevoid
fill(double value, int start, int end, int dimension)
Set all values in specified range to specified value along specified dimension.void
finishAll()
Doesn't contain Composable, so cannot propagate finishAll() to children, just calls finish() on itself insteaddouble[]
get(int i)
double
get(int e, int d)
returns the value at element i, dimension djava.util.Vector
getData()
double
getDefault(int dim)
double[]
getDefaultArray()
static double[]
getDefaultArray(DimensionNameSpace dns)
int
getDimension(java.lang.String name)
java.lang.String
getDimensionName(int dim)
java.lang.String
getDimName(int dim)
Deprecated.use getDimensionName(int dim), which is part of interface DimensionNameSpacedouble
getHighLimit(int dim)
return highest allowable value for specified dimensionint
getInt(int e, int d)
same as get(), cast to an intdouble
getLowLimit(int dim)
return lowest allowable value for specified dimensiondouble
getMax(int dim)
return precalculated maximum value found (calculated by calcStats())double
getMean(int dim)
return precalculated mean (calculated by calcStats())double
getMin(int dim)
return precalculated minimim value found (calculated by calcStats())int
getNumberOfNames()
double
getSum(int dim)
return precalulated sum (calculated by calcStats())void
insert(double[] dar, int index)
Behaves just like Vector.insertElementAt().double
integrate(int dim)
go from delta time to absolute time on specified dimension (typically 0)double
internalRepeat(double playTime)
Execute all elements in shape if an instrument is plugged in.void
invert(double val, int start, int end, int dim)
invert Shape data about a "horizontal line" .static boolean
isClippingEnabled()
boolean
isConstrainedToLimits()
When elements are add()'ed constrain them to the limits of the dimensions or notboolean
isSafeOrdering()
safe ordering flags whether or not to swap start and end arguments if end lessthan start, in methods that use them, like scramble(), reverse(), sort(), etcvoid
load(java.io.BufferedReader in)
BufferedReader in = new BufferedReader(new FileReader("foo.in")); Replace data with data loaded from a file.static void
main(java.lang.String[] args)
exercise shape building and manipulationvoid
prefab()
Same as prefab(17)void
prefab(int numElements)
Generate random data with first four dimensions interpreted as duration, pitch, amplitude, and hold time.void
print()
Calls calcStats() to generate statistics, then prints out MusicShape data to JMSL.outvoid
printDim(int i)
void
printDimNames()
print all names for all dimensionsvoid
printStats()
print statistics to JMSL.outstatic int
qa()
Quality Assurancevoid
randomize(double min, double max, int start, int end, int dim)
set random values into a shape.static MusicShape
readBinaryHMSLShape(java.io.DataInputStream in)
Read a binary file into a new Shape.void
remove(int index)
Remove child at specified indexvoid
remove(int fromIndex, int toIndex)
Removes from this MusicShape all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.void
reverse(int start, int end, int dim)
reverse the order of Shape data.void
save(java.io.PrintWriter out)
Save a MusicShape to a file PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("foo.out"))); First line is number of dimensions, followed by dimension names, one per line, followed by data, one element per line *void
scale(double scalar, int start, int end, int dim)
multiply each value by a scalar .void
scramble(int start, int end, int dim)
randomly reorder data in range.void
set(double[] dar, int e)
Replace element at position e with double[].void
set(double value, int e, int d)
set(value, elem#, dim#) replace old value at (elem, dim) with new valuevoid
set(int value, int e, int d)
void
set(long value, int e, int d)
void
setClipped(double value, int e, int d)
safer version of set, automatically clips to dimension's limits, if !isClippingEnabled, just passes value through.static void
setClippingEnabled(boolean clippingEnabled)
void
setConstrainedToLimits(boolean constrainedToLimits)
When elements are add()'ed constrain them to the limits of the dimensions or not *void
setDefault(int dim, double value)
Set a default value for a dimensionvoid
setDimensionName(int dim, java.lang.String name)
assign a name to a dimension.void
setDimName(int dim, java.lang.String name)
Give a custom name to a dimension, ex setDimName(3, "Duration")void
setDimName(java.lang.String name, int dim)
Give a custom name to a dimension, ex setDimName("Duration", 3)void
setLimits(int dim, double low, double high)
set the lowest and highest limits for a dimension, used by clippingvoid
setSafeOrdering(boolean b)
void
sort()
Sort shape on dim 0void
sort(int dim)
Sort shape in ascending values along specified dimvoid
sort(int start, int end, int dim)
Sort shape in ascending values along specified dimvoid
sort(int start, int end, int dim, DimensionComparison cf)
sorts using user defined DimensionComparison function.double
start(double startTime)
open() Instrument and return startTimeboolean
statsCalculated()
returns whether or not stats have been calculateddouble
stop(double stopTime)
close() Instrument and return stopTimevoid
sumSet(double value, int e, int d)
add double value to value in shape, like +=void
sumSet(int value, int e, int d)
add int value to value in shape, like +=void
swap(int elm1, int elm2, int dim)
swap data, dim <0 signals swap entire element, otherwise swap in specified dim onlyjava.lang.String
toString()
MusicShape
translate(DimensionNameSpace destinationNameSpace)
Create a new MusicShape populated with this MusicShape's data, after translating from this MusicShape's DimensionNameSpace to anothervoid
transpose(double val, int start, int end, int dim)
add val to a range of Shape data, clip to dim limits .boolean
usesStandardInvariants()
void
useStandardDimensionNameSpace()
renames dimension 0..3 as duration, pitch, amplitude, hold with default values and limits.void
useStandardInvariants(boolean f)
If this flag is set, and if the DimensionNameSpace of the instrument != null, then Dimensions 0..3 will be set as DimensionnameSpace invariants.Methods inherited from class com.softsynth.jmsl.MusicJob
add, addPlayLurker, addRepeatPlayable, addStartPlayable, addStopPlayable, advanceCurrentTime, contains, elements, finish, getChild, getChildren, getCurrentTime, getDataTranslator, getDuration, getInstrument, getName, getParent, getPlayLurkers, getRepeatCount, getRepeatPause, getRepeatPlayables, getRepeats, getStartDelay, getStartPause, getStartPlayables, getStartTime, getStopDelay, getStopPlayables, getTimeStretch, getTransposition, halt, indexOf, insert, isRunning, launch, launch, play, play, printHierarchy, printHierarchy, remove, removeAll, removeAllPlayLurkers, removeAllRepeatPlayables, removeAllStartPlayables, removeAllStopPlayables, removePlayLurker, removeRepeatPlayable, removeStartPlayable, removeStopPlayable, repeat, run, setCurrentTime, setDataTranslator, setDuration, setInstrument, setName, setParent, setRepeatPause, setRepeats, setStartDelay, setStartPause, setStartTime, setStopDelay, setTimeStretch, setTransposition, size, timeStretch, transposition, waitForDone
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
MusicShape
construct a new MusicShape with same number of dimensions, names, and limits as source -
MusicShape
public MusicShape(int dimensions)construct a new MusicShape with a Printing Instrument -
MusicShape
-
-
Method Details
-
getData
public java.util.Vector getData()- Returns:
- vector of raw double[] elements
-
useStandardInvariants
public void useStandardInvariants(boolean f)If this flag is set, and if the DimensionNameSpace of the instrument != null, then Dimensions 0..3 will be set as DimensionnameSpace invariants. This means that regardless of dimension names, dimension 0 of MusicShape will copy to dimension 0 of double[] handed to instrument, same for dims 1, 2, 3 This protects a standard interpretation where dim 0 = duration, dim 1 = pitch, dim 2 = amplitude, dim 3 = hold time in seconds. Defaults to true. -
usesStandardInvariants
public boolean usesStandardInvariants() -
useStandardDimensionNameSpace
public void useStandardDimensionNameSpace()renames dimension 0..3 as duration, pitch, amplitude, hold with default values and limits. If dimensions >= 4 are unaffected -
getDefaultArray
public double[] getDefaultArray()- Returns:
- array containing default values for each dimension in this MusicShape's DimensionNameSpace
-
getDefaultArray
- Returns:
- array containing default values for each dimension in DimensionNameSpace arg
-
copyDataFrom
Exact duplicate of double[] elements from source MusicShape to this MusicShape. Each double[] from the source is copied to a new double[] array before adding. safe. -
copyDataFrom
public void copyDataFrom(java.util.Vector source)Copy double[] elements from source Vector of double[] to this MusicShape. Each double[] from the source is copied to a new double[] array before adding. safe. -
dimension
public int dimension()returns how many dimensions a MusicShape has- Specified by:
dimension
in interfaceDimensionNameSpace
- Returns:
- number of dimensions. Useful if you are allocating an array for example
-
set
public void set(double[] dar, int e)Replace element at position e with double[]. Makes a copy of array before inserting it. -
set
public void set(double value, int e, int d)set(value, elem#, dim#) replace old value at (elem, dim) with new value -
set
public void set(int value, int e, int d) -
set
public void set(long value, int e, int d) -
fill
public void fill(double value, int start, int end, int dimension)Set all values in specified range to specified value along specified dimension. Range includes end. -
sumSet
public void sumSet(int value, int e, int d)add int value to value in shape, like += -
sumSet
public void sumSet(double value, int e, int d)add double value to value in shape, like += -
setDimName
public void setDimName(java.lang.String name, int dim)Give a custom name to a dimension, ex setDimName("Duration", 3) -
setDimName
public void setDimName(int dim, java.lang.String name)Give a custom name to a dimension, ex setDimName(3, "Duration") -
insert
public void insert(double[] dar, int index)Behaves just like Vector.insertElementAt(). Elements with index >= index get pushed up -
remove
public void remove(int index)Description copied from class:MusicJob
Remove child at specified index -
remove
public void remove(int fromIndex, int toIndex)Removes from this MusicShape all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. if fromIndex == toIndex, there is no effect -
add
public void add(double[] d)Add an element to this MusicShape. Element is a double[]. The array itself (not a copy) is added -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10, double d11)Add element with 12 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10)Add element with 11 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9)Add element with 10 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8)Add element with 9 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6, double d7)Add element with 8 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5, double d6)Add element with 7 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4, double d5)Add element with 6 dimensions -
add
public void add(double d0, double d1, double d2, double d3, double d4)Add element with 5 dimensions -
add
public void add(double d0, double d1, double d2, double d3)Add element with 4 dimensions -
add
public void add(double d0, double d1, double d2)Add element with 3 dimensions -
add
public void add(double d0, double d1)Add element with 2 dimensions -
add
public void add(double d0)Add element with 1 dimension -
copyDimensionNameSpace
Copy dimension names, limits and defaults from source DimensionNameSpace to this MusicShape -
getNumberOfNames
public int getNumberOfNames()- Specified by:
getNumberOfNames
in interfaceDimensionNameSpace
- Returns:
- number of names stored in name space. Not the same as highest dimension. Not all dimensions require names.
-
getDimensionName
public java.lang.String getDimensionName(int dim)- Specified by:
getDimensionName
in interfaceDimensionNameSpace
- Returns:
- name of specified dimension, or null if dim out of bounds
-
getDimension
public int getDimension(java.lang.String name)- Specified by:
getDimension
in interfaceDimensionNameSpace
- Returns:
- dimension associated with name or -1 if no dimension found for that name
-
setDimensionName
public void setDimensionName(int dim, java.lang.String name)assign a name to a dimension. dim must be < dimension()- Specified by:
setDimensionName
in interfaceDimensionNameSpace
-
setDefault
public void setDefault(int dim, double value)Set a default value for a dimension- Specified by:
setDefault
in interfaceDimensionNameSpace
-
getDefault
public double getDefault(int dim)- Specified by:
getDefault
in interfaceDimensionNameSpace
- Returns:
- default value associated with this dimension, or Double.NEGATIVE_INFINITY if dim out of range
-
dimensionNames
public java.util.Enumeration dimensionNames()- Specified by:
dimensionNames
in interfaceDimensionNameSpace
-
translate
Create a new MusicShape populated with this MusicShape's data, after translating from this MusicShape's DimensionNameSpace to another -
getDimName
public java.lang.String getDimName(int dim)Deprecated.use getDimensionName(int dim), which is part of interface DimensionNameSpacereturn name for dimension d -
get
public double[] get(int i)- Returns:
- copy of the array of double at position i. IMPORTANT! This is a COPY of the array!!!
-
get
public double get(int e, int d)returns the value at element i, dimension d -
getInt
public int getInt(int e, int d)same as get(), cast to an int -
getMin
public double getMin(int dim)return precalculated minimim value found (calculated by calcStats()) -
getMean
public double getMean(int dim)return precalculated mean (calculated by calcStats()) -
getMax
public double getMax(int dim)return precalculated maximum value found (calculated by calcStats()) -
getSum
public double getSum(int dim)return precalulated sum (calculated by calcStats()) -
getLowLimit
public double getLowLimit(int dim)return lowest allowable value for specified dimension- Specified by:
getLowLimit
in interfaceDimensionNameSpace
- Returns:
- lowest allowable value for specified dimension
-
getHighLimit
public double getHighLimit(int dim)return highest allowable value for specified dimension- Specified by:
getHighLimit
in interfaceDimensionNameSpace
- Returns:
- highest allowable value for specified dimension
-
setLimits
public void setLimits(int dim, double low, double high)set the lowest and highest limits for a dimension, used by clipping- Specified by:
setLimits
in interfaceDimensionNameSpace
-
calcDimStats
public void calcDimStats(int dim)called automatically by calcStats(), calculates statistics for specified dimension -
calcStats
public void calcStats()called automatically by print(), calculates statistics for each dimension -
statsCalculated
public boolean statsCalculated()returns whether or not stats have been calculated -
isClippingEnabled
public static boolean isClippingEnabled()- Returns:
- Returns the clippingEnabled flag.
-
setClippingEnabled
public static void setClippingEnabled(boolean clippingEnabled)- Parameters:
clippingEnabled
- The clippingEnabled to set.
-
setClipped
public void setClipped(double value, int e, int d)safer version of set, automatically clips to dimension's limits, if !isClippingEnabled, just passes value through. -
clipValDim
public double clipValDim(double value, int dim)return value clipped to dimension's limits -
convertTimeBaseDim
public void convertTimeBaseDim(double srcTicksPerSec, double destTicksPerSec, int dim)(srcTicksPerSec, destTicksPerSec, dim), recalculate all durations in specified dimension -
integrate
public double integrate(int dim)go from delta time to absolute time on specified dimension (typically 0) -
differentiate
public void differentiate(double sum, int dim)go from absolute to delta time, given sum and dimension. Sum is total duration of MusicShape (for example, the absolute time of the last element plus its hold time). dim is typically 0.Durations before (absolute time): 0 1 2 3 3.5 Durations after (delta time, assume sum passed in = 5): 1 1 1 0.5 1.5
-
randomize
public void randomize(double min, double max, int start, int end, int dim)set random values into a shape. Random chosen between min and max for specified dimension. Range includes end. -
transpose
public void transpose(double val, int start, int end, int dim)add val to a range of Shape data, clip to dim limits . Range includes end. -
scale
public void scale(double scalar, int start, int end, int dim)multiply each value by a scalar . Range includes end. -
invert
public void invert(double val, int start, int end, int dim)invert Shape data about a "horizontal line" . Range includes end. -
reverse
public void reverse(int start, int end, int dim)reverse the order of Shape data. A negative dimension signals that all dimensions should be reversed. Range includes end. -
swap
public void swap(int elm1, int elm2, int dim)swap data, dim <0 signals swap entire element, otherwise swap in specified dim only -
scramble
public void scramble(int start, int end, int dim)randomly reorder data in range. dim < 0 signals swap entire element. Range includes end. -
sort
sorts using user defined DimensionComparison function. You could ignore dim in your DimensionComparison function and do comparisions that involve more than one dimension -
sort
public void sort(int dim)Sort shape in ascending values along specified dim -
sort
public void sort(int start, int end, int dim)Sort shape in ascending values along specified dim -
sort
public void sort()Sort shape on dim 0 -
printDimNames
public void printDimNames()print all names for all dimensions -
printStats
public void printStats()print statistics to JMSL.out -
printDim
public void printDim(int i) -
print
public void print()Calls calcStats() to generate statistics, then prints out MusicShape data to JMSL.out -
dumpSource
public void dumpSource(java.lang.String filename) throws java.io.IOExceptionGenerate Java source that would recreate this MusicShape, write to a file- Throws:
java.io.IOException
-
dumpSource
public void dumpSource(java.io.PrintWriter pout) throws java.io.IOExceptionGenerate Java source that would recreate this MusicShape, write to a PrintWriter- Throws:
java.io.IOException
-
dumpSource
public java.lang.String dumpSource()Generate Java source that would recreate this MusicShape- Returns:
- String of source code
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
start
public double start(double startTime) throws java.lang.InterruptedExceptionopen() Instrument and return startTime- Specified by:
start
in interfaceComposable
- Overrides:
start
in classMusicJob
- Returns:
- endTime
- Throws:
java.lang.InterruptedException
- thrown if Thread.interrupt() called.
-
stop
public double stop(double stopTime) throws java.lang.InterruptedExceptionclose() Instrument and return stopTime- Specified by:
stop
in interfaceComposable
- Overrides:
stop
in classMusicJob
- Returns:
- endTime
- Throws:
java.lang.InterruptedException
- thrown if Thread.interrupt() called.
-
finishAll
public void finishAll()Doesn't contain Composable, so cannot propagate finishAll() to children, just calls finish() on itself instead- Specified by:
finishAll
in interfaceComposable
- Overrides:
finishAll
in classMusicJob
-
internalRepeat
public double internalRepeat(double playTime) throws java.lang.InterruptedExceptionExecute all elements in shape if an instrument is plugged in.- Specified by:
internalRepeat
in interfaceComposable
- Overrides:
internalRepeat
in classMusicJob
- Returns:
- stopTime
- Throws:
java.lang.InterruptedException
- thrown if Thread.interrupt() called.
-
prefab
public void prefab()Same as prefab(17) -
prefab
public void prefab(int numElements)Generate random data with first four dimensions interpreted as duration, pitch, amplitude, and hold time. Use a RandomWalk for pitch For dimensions > 3 randomize a value between getLowLimit() and getHighLimit() for that dimension -
clone
public java.lang.Object clone()Clones contents of shape. Makes copy of data in shape so that original can be modified without affecting clone, and vice versa. -
qa
public static int qa()Quality Assurance -
readBinaryHMSLShape
public static MusicShape readBinaryHMSLShape(java.io.DataInputStream in) throws java.io.IOExceptionRead a binary file into a new Shape. Useful for reading old HMSL Shapes into JMSL.
File format is simply: #els, #dims, width (not supported), data- Throws:
java.io.IOException
-
save
public void save(java.io.PrintWriter out) throws java.io.IOExceptionSave a MusicShape to a file PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("foo.out"))); First line is number of dimensions, followed by dimension names, one per line, followed by data, one element per line *- Throws:
java.io.IOException
-
load
public void load(java.io.BufferedReader in) throws java.io.IOExceptionBufferedReader in = new BufferedReader(new FileReader("foo.in")); Replace data with data loaded from a file. Also reads dimension names from file.- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args)exercise shape building and manipulation -
isSafeOrdering
public boolean isSafeOrdering()safe ordering flags whether or not to swap start and end arguments if end lessthan start, in methods that use them, like scramble(), reverse(), sort(), etc- Returns:
-
setSafeOrdering
public void setSafeOrdering(boolean b)- Parameters:
b
-
-
isConstrainedToLimits
public boolean isConstrainedToLimits()When elements are add()'ed constrain them to the limits of the dimensions or not- Returns:
- Returns the constrainedToLimits.
-
setConstrainedToLimits
public void setConstrainedToLimits(boolean constrainedToLimits)When elements are add()'ed constrain them to the limits of the dimensions or not *- Parameters:
constrainedToLimits
- The constrainedToLimits to set.
-