Class ConditionalFormat

java.lang.Object
com.github.miachm.sods.ConditionalFormat
All Implemented Interfaces:
Cloneable

public class ConditionalFormat extends Object implements Cloneable
This class refers to a specific rule to apply a conditional style. It's usually composed by a boolean condition and the specific style to be applied.
  • Method Details

    • getStyleApplied

      public Style getStyleApplied()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • conditionWhenValueIsGreater

      public static ConditionalFormat conditionWhenValueIsGreater(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values greater than X".
      Parameters:
      apply - the style to ble applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsLower

      public static ConditionalFormat conditionWhenValueIsLower(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values lower than X".
      Parameters:
      apply - the style to ble applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsEqual

      public static ConditionalFormat conditionWhenValueIsEqual(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values equals to X".
      Parameters:
      apply - the style to ble applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsEqual

      public static ConditionalFormat conditionWhenValueIsEqual(Style apply, String value)
    • conditionWhenValueIsGreaterOrEqual

      public static ConditionalFormat conditionWhenValueIsGreaterOrEqual(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values greater than or equal to X".
      Parameters:
      apply - the style to be applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsLowerOrEqual

      public static ConditionalFormat conditionWhenValueIsLowerOrEqual(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values lower than or equal to X".
      Parameters:
      apply - the style to be applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsNotEqual

      public static ConditionalFormat conditionWhenValueIsNotEqual(Style apply, double value)
      Create a ConditionalFormat rule where the boolean condition is "values not equal to X".
      Parameters:
      apply - the style to be applied if the condition turns true
      value - the value to compare to
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsNotEqual

      public static ConditionalFormat conditionWhenValueIsNotEqual(Style apply, String value)
    • conditionWhenTextContains

      public static ConditionalFormat conditionWhenTextContains(Style apply, String text)
      Create a ConditionalFormat rule where the boolean condition is "text contains X".
      Parameters:
      apply - the style to be applied if the condition turns true
      text - the text to search for
      Returns:
      The conditionalFormat style
    • conditionWhenTextDoesNotContain

      public static ConditionalFormat conditionWhenTextDoesNotContain(Style apply, String text)
      Create a ConditionalFormat rule where the boolean condition is "text does not contain X".
      Parameters:
      apply - the style to be applied if the condition turns true
      text - the text to search for
      Returns:
      The conditionalFormat style
    • conditionWhenTextStartsWith

      public static ConditionalFormat conditionWhenTextStartsWith(Style apply, String text)
      Create a ConditionalFormat rule where the boolean condition is "text starts with X".
      Parameters:
      apply - the style to be applied if the condition turns true
      text - the text prefix to check for
      Returns:
      The conditionalFormat style
    • conditionWhenTextEndsWith

      public static ConditionalFormat conditionWhenTextEndsWith(Style apply, String text)
      Create a ConditionalFormat rule where the boolean condition is "text ends with X".
      Parameters:
      apply - the style to be applied if the condition turns true
      text - the text suffix to check for
      Returns:
      The conditionalFormat style
    • conditionWhenCellIsEmpty

      public static ConditionalFormat conditionWhenCellIsEmpty(Style apply)
      Create a ConditionalFormat rule where the boolean condition is "cell is empty".
      Parameters:
      apply - the style to be applied if the condition turns true
      Returns:
      The conditionalFormat style
    • conditionWhenCellIsNotEmpty

      public static ConditionalFormat conditionWhenCellIsNotEmpty(Style apply)
      Create a ConditionalFormat rule where the boolean condition is "cell is not empty".
      Parameters:
      apply - the style to be applied if the condition turns true
      Returns:
      The conditionalFormat style
    • conditionWhenValueIsBetween

      public static ConditionalFormat conditionWhenValueIsBetween(Style apply, double init, double end)