All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.joern.php2cpg.utils.ArrayIndexTracker.scala Maven / Gradle / Ivy

There is a newer version: 4.0.131
Show newest version
package io.joern.php2cpg.datastructures

class ArrayIndexTracker {
  private var currentValue = 0

  def next: String = {
    val nextVal = currentValue
    currentValue += 1
    nextVal.toString
  }

  def updateValue(newValue: Int): Unit = {
    if (newValue >= currentValue) {
      currentValue = newValue + 1
    }
  }
}

object ArrayIndexTracker {
  def apply(): ArrayIndexTracker = new ArrayIndexTracker
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy