Class FixedValueFeature

  • All Implemented Interfaces:
    Feature
    Direct Known Subclasses:
    SettableFeature

    public class FixedValueFeature
    extends java.lang.Object
    implements Feature
    A feature implementation that has a fixed value of availability.
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedValueFeature​(java.lang.String name, boolean available)  
      FixedValueFeature​(java.lang.String name, int availability)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int availability()
      Returns the availability of this feature, an integer between 0 and 100.
      boolean isAvailable()
      Whether this feature is available or not.
      java.lang.String name()
      Returns a textual representation of the feature.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • name

        protected final java.lang.String name
      • availability

        protected int availability
    • Constructor Detail

      • FixedValueFeature

        public FixedValueFeature​(java.lang.String name,
                                 int availability)
      • FixedValueFeature

        public FixedValueFeature​(java.lang.String name,
                                 boolean available)
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Feature
        Returns a textual representation of the feature.
        Specified by:
        name in interface Feature
        Returns:
        name of the feature.
      • availability

        public int availability()
        Description copied from interface: Feature
        Returns the availability of this feature, an integer between 0 and 100.
        Specified by:
        availability in interface Feature
        Returns:
        the availability of this feature.
      • isAvailable

        public boolean isAvailable()
        Description copied from interface: Feature
        Whether this feature is available or not.
        Specified by:
        isAvailable in interface Feature
        Returns:
        true if this feature is available, otherwise false.