Class/Object

net.psforever.objects.guid.source

LimitedNumberSource

Related Docs: object LimitedNumberSource | package source

Permalink

class LimitedNumberSource extends NumberSource

A NumberSource is considered a master "pool" of numbers from which all numbers are available to be drawn. The numbers are considered to be exclusive.

Produce a series of numbers from 0 to a maximum number (inclusive) to be used as globally unique identifiers (GUIDs).

Source
LimitedNumberSource.scala
Exceptions thrown

IllegalArgumentException if max is less than zero (therefore the count of generated numbers is at most zero)

java.lang.NegativeArraySizeException if the count of numbers generated due to max is negative

Linear Supertypes
NumberSource, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LimitedNumberSource
  2. NumberSource
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LimitedNumberSource(max: Int)

    Permalink

    max

    the highest number to be generated by this source; must be a positive integer or zero

    Exceptions thrown

    IllegalArgumentException if max is less than zero (therefore the count of generated numbers is at most zero)

    java.lang.NegativeArraySizeException if the count of numbers generated due to max is negative

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to any2stringadd[LimitedNumberSource] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (LimitedNumberSource, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to ArrowAssoc[LimitedNumberSource] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def Available(number: Int): Option[LoanedKey]

    Permalink

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used.

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used. The Monitor should be updated before being wrapped, if necessary.

    number

    the number

    returns

    the wrapped Monitor, or None

    Definition Classes
    LimitedNumberSourceNumberSource
  7. def Clear(): List[IdentifiableEntity]

    Permalink

    Reset all number Monitors so that their underlying number is not longer treated as assigned.

    Reset all number Monitors so that their underlying number is not longer treated as assigned. Perform some level of housecleaning to ensure that all dependencies are resolved in some manner. This is the only way to free Monitors that are marked as Restricted.

    returns

    a List of assignments maintained by all the currently-used number Monitors

    Definition Classes
    LimitedNumberSourceNumberSource
  8. def CountAvailable: Int

    Permalink

    The count of numbers that can still be drawn.

    The count of numbers that can still be drawn.

    returns

    the count

    Definition Classes
    LimitedNumberSourceNumberSource
  9. def CountUsed: Int

    Permalink

    The count of numbers that can not be drawn.

    The count of numbers that can not be drawn.

    returns

    the count

    Definition Classes
    LimitedNumberSourceNumberSource
  10. def FinalizeRestrictions: List[Int]

    Permalink

    Numbers from this source may not longer be marked as Restricted.

    Numbers from this source may not longer be marked as Restricted.

    returns

    the List of all numbers that have been restricted

    Definition Classes
    LimitedNumberSourceNumberSource
  11. def Get(number: Int): Option[SecureKey]

    Permalink

    Produce an un-modifiable wrapper for the Monitor for this number.

    Produce an un-modifiable wrapper for the Monitor for this number.

    number

    the number

    returns

    the wrapped Monitor

    Definition Classes
    LimitedNumberSourceNumberSource
  12. def Restrict(number: Int): Option[LoanedKey]

    Permalink

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used.

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used. This wrapped Monitor can only be assigned once and the number may not be Returned to this source.

    number

    the number

    returns

    the wrapped Monitor

    Definition Classes
    LimitedNumberSourceNumberSource
    Exceptions thrown

    ArrayIndexOutOfBoundsException if the requested number is above or below the range

  13. def Return(number: Int): Option[IdentifiableEntity]

    Permalink

    Consume the number of a Monitor and release that number from its previous assignment/use.

    Consume the number of a Monitor and release that number from its previous assignment/use.

    number

    the number

    returns

    any object previously using this number

    Definition Classes
    LimitedNumberSourceNumberSource
  14. def Return(monitor: LoanedKey): Option[IdentifiableEntity]

    Permalink

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    monitor

    the Monitor

    returns

    any object previously using this Monitor

    Definition Classes
    NumberSource
  15. def Return(monitor: SecureKey): Option[IdentifiableEntity]

    Permalink

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    monitor

    the Monitor

    returns

    any object previously using this Monitor

    Definition Classes
    NumberSource
  16. def Size: Int

    Permalink

    The count of numbers allocated to this source.

    The count of numbers allocated to this source.

    returns

    the count

    Definition Classes
    LimitedNumberSourceNumberSource
  17. def Test(number: Int): Boolean

    Permalink

    Is this number a member of this number source?

    Is this number a member of this number source?

    number

    the number

    returns

    true, if it is a member; false, otherwise

    Definition Classes
    NumberSource
  18. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def ensuring(cond: (LimitedNumberSource) ⇒ Boolean, msg: ⇒ Any): LimitedNumberSource

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to Ensuring[LimitedNumberSource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: (LimitedNumberSource) ⇒ Boolean): LimitedNumberSource

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to Ensuring[LimitedNumberSource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean, msg: ⇒ Any): LimitedNumberSource

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to Ensuring[LimitedNumberSource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean): LimitedNumberSource

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to Ensuring[LimitedNumberSource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to StringFormat[LimitedNumberSource] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def [B](y: B): (LimitedNumberSource, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from LimitedNumberSource to ArrowAssoc[LimitedNumberSource] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from NumberSource

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from LimitedNumberSource to any2stringadd[LimitedNumberSource]

Inherited by implicit conversion StringFormat from LimitedNumberSource to StringFormat[LimitedNumberSource]

Inherited by implicit conversion Ensuring from LimitedNumberSource to Ensuring[LimitedNumberSource]

Inherited by implicit conversion ArrowAssoc from LimitedNumberSource to ArrowAssoc[LimitedNumberSource]

Ungrouped