Package org.apache.bookkeeper.feature
Class FixedValueFeature
java.lang.Object
org.apache.bookkeeper.feature.FixedValueFeature
- All Implemented Interfaces:
Feature
- Direct Known Subclasses:
SettableFeature
A feature implementation that has a fixed value of availability.
-
Field Summary
FieldsFields inherited from interface org.apache.bookkeeper.feature.Feature
FEATURE_AVAILABILITY_MAX_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionFixedValueFeature(String name, boolean available) FixedValueFeature(String name, int availability) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the availability of this feature, an integer between 0 and 100.booleanWhether this feature is available or not.name()Returns a textual representation of the feature.
-
Field Details
-
name
-
availability
protected int availability
-
-
Constructor Details
-
FixedValueFeature
-
FixedValueFeature
-
-
Method Details
-
name
Description copied from interface:FeatureReturns a textual representation of the feature. -
availability
public int availability()Description copied from interface:FeatureReturns the availability of this feature, an integer between 0 and 100.- Specified by:
availabilityin interfaceFeature- Returns:
- the availability of this feature.
-
isAvailable
public boolean isAvailable()Description copied from interface:FeatureWhether this feature is available or not.- Specified by:
isAvailablein interfaceFeature- Returns:
- true if this feature is available, otherwise false.
-