Interface Feature

  • All Known Implementing Classes:
    NamedFeature

    public interface Feature

    This interface represents a feature and is typically implemented by the feature enum.

    Usually it makes sense to implement the following method which allows a very easy way to check the status of a feature.

     public boolean isActive() {
         return FeatureContext.getFeatureManager().isActive(this);
     }
     

    Please note that in Togglz 2.0 the isActive() method isn't defined in the interface any more. So when updating to Togglz 2.0, you will have to remove the Override annotation from your implementation of the method.

    Author:
    Christian Kaltepoth
    • Method Detail

      • name

        String name()
        Returns a textual representation of the feature. This method is implicitly implemented as feature typically are enumerations.
        Returns:
        Name of the feature