Class SimpleRenderCondition

java.lang.Object
com.adobe.granite.ui.components.rendercondition.SimpleRenderCondition
All Implemented Interfaces:
RenderCondition

public final class SimpleRenderCondition extends Object implements RenderCondition
A condition that takes a simple boolean for the decision.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RenderCondition
    The condition that always returns false.
    static final RenderCondition
    The condition that always returns true.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleRenderCondition(boolean decision)
    Instantiates based on the given boolean decision.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the component should be rendered; false otherwise.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TRUE

      @Nonnull public static final RenderCondition TRUE
      The condition that always returns true.
    • FALSE

      @Nonnull public static final RenderCondition FALSE
      The condition that always returns false.
  • Constructor Details

    • SimpleRenderCondition

      public SimpleRenderCondition(boolean decision)
      Instantiates based on the given boolean decision.
      Parameters:
      decision - the decision
  • Method Details

    • check

      public boolean check()
      Description copied from interface: RenderCondition
      Returns true if the component should be rendered; false otherwise.
      Specified by:
      check in interface RenderCondition
      Returns:
      true if the component should be rendered, false otherwise