Line data Source code
1 : // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 : // for details. All rights reserved. Use of this source code is governed by a 3 : // BSD-style license that can be found in the LICENSE file. 4 : 5 : import '../boolean_selector.dart'; 6 : 7 : /// A selector that matches no inputs. 8 : class None implements BooleanSelector { 9 : @override 10 : final Iterable<String> variables = const []; 11 : 12 11 : const None(); 13 : 14 0 : @override 15 : bool evaluate(bool Function(String variable) semantics) => false; 16 : 17 0 : @override 18 : BooleanSelector intersection(BooleanSelector other) => this; 19 : 20 0 : @override 21 : BooleanSelector union(BooleanSelector other) => other; 22 : 23 0 : @override 24 : void validate(bool Function(String) isDefined) {} 25 : 26 0 : @override 27 : String toString() => '<none>'; 28 : }