LanguageVersion class abstract

A language version.

A language version is represented by two non-negative integers, the major and minor version numbers.

If errors during parsing are handled using an onError handler, then an invalid language version may be represented by an InvalidLanguageVersion object.

Implemented types
Implementers
Available extensions

Constructors

LanguageVersion.new(int major, int minor)
Constructs a LanguageVersion with the specified major and minor version numbers.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
major int
The major language version.
no setter
minor int
The minor language version.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(LanguageVersion other) int
Compares language versions.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of the language version.
override

Operators

operator <(LanguageVersion other) bool

Available on LanguageVersion, provided by the LanguageVersionRelationalOperators extension

Whether this language version is less than other.
operator <=(LanguageVersion other) bool

Available on LanguageVersion, provided by the LanguageVersionRelationalOperators extension

Whether this language version is less than or equal to other.
operator ==(Object other) bool
Valid language versions with the same major and minor values are equal.
override
operator >(LanguageVersion other) bool

Available on LanguageVersion, provided by the LanguageVersionRelationalOperators extension

Whether this language version is greater than other.
operator >=(LanguageVersion other) bool

Available on LanguageVersion, provided by the LanguageVersionRelationalOperators extension

Whether this language version is greater than or equal to other.

Static Methods

parse(String source, {void onError(Object error)?}) LanguageVersion
Parses a language version string.

Constants

maxValue → const int
The maximal value allowed by major and minor values;