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

io.joern.x2cpg.datastructures.Stack.scala Maven / Gradle / Ivy

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

import scala.collection.mutable

object Stack {

  type Stack[StackElement] = mutable.ListBuffer[StackElement]

  implicit class StackWrapper[StackElement](val parentStack: Stack[StackElement]) extends AnyVal {
    def push(parent: StackElement): Unit = {
      parentStack.prepend(parent)
    }

    def pop(): Unit = {
      parentStack.remove(0)
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy