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

io.shiftleft.codepropertygraph.generated.traversals.TraversalPropertyIsExplicit.scala Maven / Gradle / Ivy

There is a newer version: 1.7.13
Show newest version
package io.shiftleft.codepropertygraph.generated.traversals

import io.shiftleft.codepropertygraph.generated.nodes
import io.shiftleft.codepropertygraph.generated.accessors.languagebootstrap.*

final class TraversalPropertyIsExplicit[NodeType <: nodes.StoredNode & nodes.StaticType[nodes.HasIsExplicitEMT]](
  val traversal: Iterator[NodeType]
) extends AnyVal {

  /** Traverse to isExplicit property */
  def isExplicit: Iterator[Boolean] =
    traversal.flatMap(_.isExplicit)

  /** Traverse to nodes where the isExplicit equals the given `value`
    */
  def isExplicit(value: Boolean): Iterator[NodeType] =
    traversal.filter { node => node.isExplicit.isDefined && node.isExplicit.get == value }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy