Class Flags

java.lang.Object
com.djrapitops.plan.extension.statistic.Flags

public final class Flags extends Object
Return value for FlagsProvider.

Stores named Boolean flags. A null value represents a missing flag value, but its name is retained so that it can be displayed as missing.

  • Constructor Details

    • Flags

      public Flags()
  • Method Details

    • create

      public static Flags create()
    • put

      public Flags put(String key, Boolean value)
      Place a flag in the object.
      Parameters:
      key - Flag name.
      value - Boolean value, or null to represent a missing value.
      Returns:
      This object.
    • putAll

      public Flags putAll(Map<String,Boolean> flags)
      Place flags in the object.
      Parameters:
      flags - String-Boolean map. Null values represent missing flags.
      Returns:
      This object.
    • addAllTrue

      public Flags addAllTrue(Collection<String> trueFlags)
      Place flags with value 'true' in the object.
      Parameters:
      trueFlags - List of flag names
      Returns:
      This object.
    • addAllFalse

      public Flags addAllFalse(Collection<String> falseFlags)
      Place flags with value 'false' in the object.
      Parameters:
      falseFlags - List of flag names
      Returns:
      This object.
    • getValueByKey

      public Map<String,Boolean> getValueByKey()
      The method Plan uses to get access to the data.
      Returns:
      Values stored in this object.
    • isEmpty

      public boolean isEmpty()