org.encog.util.identity

## Class BasicGenerateID

- java.lang.Object
- - org.encog.util.identity.BasicGenerateID

- All Implemented Interfaces:
    Serializable, GenerateID

      public class BasicGenerateID
      extends Object
      implements GenerateID, Serializable

  Used to generate a unique id.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicGenerateID()` Construct the ID generator to start at 1.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `generate()` Generate the next ID.
    `long` | `getCurrentID()`
    `void` | `setCurrentID(long currentID)`

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

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

- - ### Constructor Detail

    - #### BasicGenerateID

          public BasicGenerateID()

      Construct the ID generator to start at 1.

  - ### Method Detail

    - #### generate

          public long generate()

      Generate the next ID.
      Specified by:
        `generate` in interface `GenerateID`
      Returns:
        The next ID.

    - #### getCurrentID

          public long getCurrentID()

      Specified by:
        `getCurrentID` in interface `GenerateID`
      Returns:
        the currentID

    - #### setCurrentID

          public void setCurrentID(long currentID)

      Specified by:
        `setCurrentID` in interface `GenerateID`
      Parameters:
        `currentID` - the currentID to set

Copyright © 2014. All Rights Reserved.