Package org.apache.sysds.runtime.controlprogram.parfor.util

# Class IDSequence

java.lang.Object
org.apache.sysds.runtime.controlprogram.parfor.util.IDSequence

public class IDSequence extends Object
ID sequence for generating unique long identifiers with start 0 and increment 1.

## Constructor Summary

Constructors
Constructor
Description
`IDSequence()`
`IDSequence(boolean cyclic)`
`IDSequence(boolean cyclic, long cycleLen)`

## Method Summary

Modifier and Type
Method
Description
`long`
`getCurrentID()`
`long`
`getNextID()`
Creates the next ID, if overflow a RuntimeException is thrown.
`void`
`reset()`
`void`
`reset(long value)`

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

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

## Constructor Details

### IDSequence

public IDSequence()

### IDSequence

public IDSequence(boolean cyclic)

### IDSequence

public IDSequence(boolean cyclic, long cycleLen)

## Method Details

### getNextID

public long getNextID()
Creates the next ID, if overflow a RuntimeException is thrown.

Returns:
  ID

### getCurrentID

public long getCurrentID()

### reset

public void reset()

### reset

public void reset(long value)