Package jline.lang

Class FeatureSet

java.lang.Object
jline.lang.FeatureSet
All Implemented Interfaces:
Serializable

public class FeatureSet extends Object implements Serializable
Class representing the features of a particular solver
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new FeatureSet with all features initialized to false.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether the given feature is used or not in the current feature set
    void
    setFalse(String feature)
    Sets a single feature to false in the feature set.
    void
    setFalse(String[] features)
    Sets multiple features to false in the feature set.
    void
    setTrue(String feature)
    Sets a single feature to true in the feature set.
    void
    setTrue(String[] features)
    Sets multiple features to true in the feature set.
    static boolean
    supports(FeatureSet supported, FeatureSet used)
    Checks if the used features are supported by the given solver

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FeatureSet

      public FeatureSet()
      Creates a new FeatureSet with all features initialized to false. This represents the default state where no features are enabled.
  • Method Details

    • supports

      public static boolean supports(FeatureSet supported, FeatureSet used)
      Checks if the used features are supported by the given solver
      Parameters:
      supported - - the features supported by the solver
      used - - the used features
      Returns:
      - true if the used features are supported, false otherwise
    • inspectFeature

      public boolean inspectFeature(String feature)
      Checks whether the given feature is used or not in the current feature set
      Parameters:
      feature - - the name of the given feature
      Returns:
      - true if the given feature is used, false otherwise
    • setFalse

      public void setFalse(String[] features)
      Sets multiple features to false in the feature set.
      Parameters:
      features - array of feature names to disable
      Throws:
      RuntimeException - if any feature name is not recognized
    • setFalse

      public void setFalse(String feature)
      Sets a single feature to false in the feature set.
      Parameters:
      feature - the name of the feature to disable
      Throws:
      RuntimeException - if the feature name is not recognized
    • setTrue

      public void setTrue(String feature)
      Sets a single feature to true in the feature set.
      Parameters:
      feature - the name of the feature to enable
      Throws:
      RuntimeException - if the feature name is not recognized
    • setTrue

      public void setTrue(String[] features)
      Sets multiple features to true in the feature set.
      Parameters:
      features - array of feature names to enable
      Throws:
      RuntimeException - if any feature name is not recognized