Example #1
0
 @Override
 public V<T> reduce(@Nonnull FeatureExpr reducedConfigSpace) {
   assert reducedConfigSpace != null;
   FeatureExpr newCondition = configSpace.and(reducedConfigSpace);
   if (newCondition.isSatisfiable()) return new One(newCondition, value);
   else return VEmpty.instance();
 }
Example #2
0
  @Override
  public V<T> select(FeatureExpr selectConfigSpace) {
    assert selectConfigSpace.implies(configSpace).isTautology()
        : "selecting under broader condition ("
            + selectConfigSpace
            + ") than the configuration space described by One ("
            + configSpace
            + ")";

    FeatureExpr newCondition = configSpace.and(selectConfigSpace);
    if (newCondition.isSatisfiable()) return new One(newCondition, value);
    else return VEmpty.instance();
  }