public <T>T withFeature(final Feature feature,final Supplier<T> isSet,final Supplier<T> isNotSet){
  return hasFeature(feature) ? isSet.get() : isNotSet.get();
}

public < T > T withFeature ( final Feature feature , final Supplier < T > isSet , final Supplier < T > isNotSet ) { return hasFeature ( feature ) ? isSet . get ( ) : isNotSet . get ( ) ; }
run the given operation if feature is set , or another operation if it is not .
