Package jebl.math

# Class OrderEnumerator.Utils

java.lang.Object
jebl.math.OrderEnumerator.Utils

Enclosing interface:
  `OrderEnumerator`

public static class OrderEnumerator.Utils extends Object

## Method Summary

Modifier and Type
Method
Description
`static final OrderEnumerator`
`getAdjusted(OrderEnumerator toAdjust, int adjustmentFactor)`
`static final OrderEnumerator.OEFactory`
`getAdjustedFactory(OrderEnumerator.OEFactory toAdjust, int adjustmentFactor)`
`static final OrderEnumerator`
`getAlternating(OrderEnumerator primary, OrderEnumerator secondary)`
`static final OrderEnumerator.OEFactory`
`getAlternatingFactory(OrderEnumerator.OEFactory primary, OrderEnumerator.OEFactory secondary)`
`static final OrderEnumerator`
`getBiasAlternating(OrderEnumerator primary, OrderEnumerator secondary)`
`static final OrderEnumerator.OEFactory`
`getBiasAlternatingFactory(OrderEnumerator.OEFactory primary, OrderEnumerator.OEFactory secondary)`
`static final OrderEnumerator`
`getConstant(int index)`
`static final OrderEnumerator.OEFactory`
`getConstantFactory(int index)`
`static final OrderEnumerator`
`getOrdered(int size)`
`static final OrderEnumerator.OEFactory`
`getOrderedFactory()`
`static final OrderEnumerator`
`getRestricted(OrderEnumerator toRestrict, int minimum, int range)`
`static final OrderEnumerator.OEFactory`
`getRestrictedFactory(OrderEnumerator.OEFactory toRestrict, int minimum, int range)`
`static final OrderEnumerator`
`getShuffled(int size)`
`static final OrderEnumerator.OEFactory`
`getShuffledFactory()`
`static final OrderEnumerator`
`getZero()`
`static final OrderEnumerator.OEFactory`
`getZeroFactory()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getConstant

public static final OrderEnumerator getConstant(int index)

Parameters:
  `index` - The index to always return
Returns:
  an OrderEnumerator object that always returns 'index'

### getOrdered

public static final OrderEnumerator getOrdered(int size)

Parameters:
  `size` - the number of different indexes returned (between 0 and size-1)
Returns:
  an OrderEnumerator object returns index in order between a certain range

### getShuffled

public static final OrderEnumerator getShuffled(int size)

Parameters:
  `size` - the number of different indexes returned (between 0 and size-1)
Returns:
  an OrderEnumerator object returns index in random order between a certain range (order changes with each reset)

### getBiasAlternating

public static final OrderEnumerator getBiasAlternating(OrderEnumerator primary, OrderEnumerator secondary)

Parameters:
  `primary` - The primary OrderEnumerator, one index is taken from this enumertor than an entire sequence of the secondary is taken
  `secondary` - The primary OrderEnumerator, the entire sequence of a secondary enumerator is taken for every single index from the primary enumerator
Returns:
  an OrderEnumerator object that combines two sub enumerators

### getAlternating

public static final OrderEnumerator getAlternating(OrderEnumerator primary, OrderEnumerator secondary)

Parameters:
  `primary` - The primary OrderEnumerator
  `secondary` - The primary OrderEnumerator
Returns:
  an OrderEnumerator object that combines two sub enumerators, by alternating between outputs

### getZero

public static final OrderEnumerator getZero()

Returns:
  OrderEnumerator that always returns 0 (zero)

### getRestricted

public static final OrderEnumerator getRestricted(OrderEnumerator toRestrict, int minimum, int range)

Parameters:
  `minimum` - minmim value released
  `range` - range of values released (that is values go between minimum (inclusive) and minimum+range(exclusive)
Returns:
  an OrderEnumerator that is restricted in indexes it returns based on base Enumerator

### getAdjusted

public static final OrderEnumerator getAdjusted(OrderEnumerator toAdjust, int adjustmentFactor)

Returns:
  OrderEnumerator that always returns 0 (zero)

### getZeroFactory

public static final OrderEnumerator.OEFactory getZeroFactory()

Returns:
  OrderEnumerator that always returns 0 (zero)

### getConstantFactory

public static final OrderEnumerator.OEFactory getConstantFactory(int index)

Parameters:
  `index` - The index to always return
Returns:
  an OrderEnumerator object that always returns 'index'

### getOrderedFactory

public static final OrderEnumerator.OEFactory getOrderedFactory()

Returns:
  an OrderEnumerator object returns index in order between a certain range

### getShuffledFactory

public static final OrderEnumerator.OEFactory getShuffledFactory()

Returns:
  an OrderEnumerator object returns index in random order between a certain range (order changes with each reset)

### getAdjustedFactory

public static final OrderEnumerator.OEFactory getAdjustedFactory(OrderEnumerator.OEFactory toAdjust, int adjustmentFactor)

Parameters:
  `adjustmentFactor` - If to adjust returns x, adjusted will return x+adjustmentFactory (it's that simple)
Returns:
  an OrderEnumerator that returns indexes adjusted from a base enumerator

### getRestrictedFactory

public static final OrderEnumerator.OEFactory getRestrictedFactory(OrderEnumerator.OEFactory toRestrict, int minimum, int range)

Parameters:
  `minimum` - minmim value released
  `range` - range of values released (that is values go between minimum (inclusive) and minimum+range(exclusive)
Returns:
  an OrderEnumerator that is restricted in indexes it returns based on base Enumerator

### getAlternatingFactory

public static final OrderEnumerator.OEFactory getAlternatingFactory(OrderEnumerator.OEFactory primary, OrderEnumerator.OEFactory secondary)

Returns:
  an OrderEnumerator object that alternates outputs between two base enumerator

### getBiasAlternatingFactory

public static final OrderEnumerator.OEFactory getBiasAlternatingFactory(OrderEnumerator.OEFactory primary, OrderEnumerator.OEFactory secondary)

Returns:
  an OrderEnumerator object that alternates outputs between two base enumerator (takes one from primary, than all from secondary, one from primary, all from secondary)