Class GlslSwitchNode

java.lang.Object
foundry.veil.impl.glsl.node.branch.GlslSwitchNode
All Implemented Interfaces:
GlslNode

public class GlslSwitchNode extends Object implements GlslNode
Switch statement.
  • Constructor Details

  • Method Details

    • getCondition

      public GlslNode getCondition()
      Returns:
      The condition inside the switch switch(condition) {}
    • getBranches

      public List<GlslNode> getBranches()
      Returns:
      All code inside the switch, including all labels and code under those labels
    • setCondition

      public GlslSwitchNode setCondition(GlslNode condition)
      Sets the input condition for this switch statement.
      Parameters:
      condition - The new condition to use
    • setBranches

      public GlslSwitchNode setBranches(Collection<GlslNode> branches)
      Replaces all branches with the specified values.
      Parameters:
      branches - The new branches
    • setBranches

      public GlslSwitchNode setBranches(GlslNode... branches)
      Replaces all branches with the specified values.
      Parameters:
      branches - The new branches
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSourceString

      public String getSourceString()
      Specified by:
      getSourceString in interface GlslNode
    • stream

      public Stream<GlslNode> stream()
      Specified by:
      stream in interface GlslNode