Class FeatureFlags

  • All Implemented Interfaces:
    java.lang.Iterable<FeatureFlag>

    public class FeatureFlags
    extends java.lang.Object
    implements java.lang.Iterable<FeatureFlag>
    • Constructor Summary

      Constructors 
      Constructor Description
      FeatureFlags()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFlag​(java.lang.String name, boolean enabled)
      Adds the feature flag of given name and given value.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isEnabled​(java.lang.String flagName)
      Returns true if the feature flag with given name exists and is enabled, false otherwise.
      java.util.Iterator<FeatureFlag> iterator()  
      void removeFlag​(java.lang.String flagName)
      Removes flag of given name.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • AGGREGATED_FEATURE_FLAGS_URI

        public static final java.lang.String AGGREGATED_FEATURE_FLAGS_URI
        See Also:
        Constant Field Values
    • Constructor Detail

      • FeatureFlags

        public FeatureFlags()
    • Method Detail

      • addFlag

        public void addFlag​(java.lang.String name,
                            boolean enabled)
        Adds the feature flag of given name and given value.
        Parameters:
        name - feature flag name
        enabled - feature flag value (enabled / disabled)
      • removeFlag

        public void removeFlag​(java.lang.String flagName)
        Removes flag of given name.
        Parameters:
        flagName - name of the flag to remove
      • iterator

        public java.util.Iterator<FeatureFlag> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<FeatureFlag>
      • isEnabled

        public boolean isEnabled​(java.lang.String flagName)
        Returns true if the feature flag with given name exists and is enabled, false otherwise.
        Parameters:
        flagName - the name of feature flag
        Returns:
        true if the feature flag with given name exists and is enabled, false otherwise
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object