An interface that represents an ISO-standardized object.
The IsoStandardized interface is used to represent objects that conform to ISO standards. The interface defines properties for the ISO code, the name of the object, and other optional properties.
The Name
type parameter is used to specify the type of the name property.
The name property can be any object that represents the name of the object.
Example usage:
class NaturalLanguage implements IsoStandardized<String> {
const NaturalLanguage({
required this.name,
required this.code,
this.namesNative,
this.codeShort,
});
final String code;
final String? codeShort;
final String name;
final List<String>? namesNative;
@override
String? get codeOther => codeShort;
}
In this example the NaturalLanguage
class implements the IsoStandardized
interface with a String
type parameter for the name property. The class
defines properties for the ISO code, the name of the natural language, and
other optional properties. The IsoStandardized
interface is used to ensure
that the NaturalLanguage
class conforms to ISO standards.
- Implementers
Constructors
-
IsoStandardized({required Name name, required String code, List<
Name> ? namesNative, String? codeOther}) -
Creates a new instance of the IsoStandardized object.
const
Properties
- code → String
-
A string representing the ISO (usually a 3-letter) code for the object.
final
- codeOther → String?
-
An optional string representing an alternative ISO code for the object.
This is typically used for short code (2-letter, as codeShort) or numeric
code (3-digit, as codeNumeric).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → Name
-
An object representing the name of the object.
final
-
namesNative
→ List<
Name> ? -
An optional list of objects representing the native names of the object.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
{bool short = true}) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- codeLength → const int
- The regular length of the ISO code (3 characters). However, it's important to note that this length is not standardized for all ISO codes. Some ISO codes may have a different length. For example, the ISO 15924 code has a length of 4. To determine the specific length of the code for a particular ISO realization of this interface, please refer to the documentation of that realization.
- codeShortLength → const int
- The regular length of the short ISO code (2 characters).
- standardAcronym → const String
- The acronym for the International Organization for Standardization (ISO).