| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.utilities.dart; | 3 library engine.utilities.dart; |
| 4 /** | 4 /** |
| 5 * The enumeration `ParameterKind` defines the different kinds of parameters. Th
ere are two | 5 * The enumeration `ParameterKind` defines the different kinds of parameters. Th
ere are two |
| 6 * basic kinds of parameters: required and optional. Optional parameters are fur
ther divided into | 6 * basic kinds of parameters: required and optional. Optional parameters are fur
ther divided into |
| 7 * two kinds: positional optional and named optional. | 7 * two kinds: positional optional and named optional. |
| 8 * |
| 8 * @coverage dart.engine.utilities | 9 * @coverage dart.engine.utilities |
| 9 */ | 10 */ |
| 10 class ParameterKind implements Comparable<ParameterKind> { | 11 class ParameterKind implements Comparable<ParameterKind> { |
| 11 static final ParameterKind REQUIRED = new ParameterKind('REQUIRED', 0, false); | 12 static final ParameterKind REQUIRED = new ParameterKind('REQUIRED', 0, false); |
| 12 static final ParameterKind POSITIONAL = new ParameterKind('POSITIONAL', 1, tru
e); | 13 static final ParameterKind POSITIONAL = new ParameterKind('POSITIONAL', 1, tru
e); |
| 13 static final ParameterKind NAMED = new ParameterKind('NAMED', 2, true); | 14 static final ParameterKind NAMED = new ParameterKind('NAMED', 2, true); |
| 14 static final List<ParameterKind> values = [REQUIRED, POSITIONAL, NAMED]; | 15 static final List<ParameterKind> values = [REQUIRED, POSITIONAL, NAMED]; |
| 15 | 16 |
| 16 /// The name of this enum constant, as declared in the enum declaration. | 17 /// The name of this enum constant, as declared in the enum declaration. |
| 17 final String name; | 18 final String name; |
| 18 | 19 |
| 19 /// The position in the enum declaration. | 20 /// The position in the enum declaration. |
| 20 final int ordinal; | 21 final int ordinal; |
| 21 | 22 |
| 22 /** | 23 /** |
| 23 * A flag indicating whether this is an optional parameter. | 24 * A flag indicating whether this is an optional parameter. |
| 24 */ | 25 */ |
| 25 bool _isOptional2 = false; | 26 bool _isOptional2 = false; |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * Initialize a newly created kind with the given state. | 29 * Initialize a newly created kind with the given state. |
| 30 * |
| 29 * @param isOptional `true` if this is an optional parameter | 31 * @param isOptional `true` if this is an optional parameter |
| 30 */ | 32 */ |
| 31 ParameterKind(this.name, this.ordinal, bool isOptional) { | 33 ParameterKind(this.name, this.ordinal, bool isOptional) { |
| 32 this._isOptional2 = isOptional; | 34 this._isOptional2 = isOptional; |
| 33 } | 35 } |
| 34 | 36 |
| 35 /** | 37 /** |
| 36 * Return `true` if this is an optional parameter. | 38 * Return `true` if this is an optional parameter. |
| 39 * |
| 37 * @return `true` if this is an optional parameter | 40 * @return `true` if this is an optional parameter |
| 38 */ | 41 */ |
| 39 bool get isOptional => _isOptional2; | 42 bool get isOptional => _isOptional2; |
| 40 int compareTo(ParameterKind other) => ordinal - other.ordinal; | 43 int compareTo(ParameterKind other) => ordinal - other.ordinal; |
| 41 int get hashCode => ordinal; | 44 int get hashCode => ordinal; |
| 42 String toString() => name; | 45 String toString() => name; |
| 43 } | 46 } |
| OLD | NEW |