NameIndex class

A fixed set of values to handle specific positions for list of names.

As for list of names, this helps to follow a specific order based on the count of elements. It is expected that the list has to be between two and five elements. Also, the order of appearance set in the Configuration influences how the parsing is carried out.

Ordered by first name, the parser works as follows:

  • 2 elements: firstName lastName
  • 3 elements: firstName middleName lastName
  • 4 elements: prefix firstName middleName lastName
  • 5 elements: prefix firstName middleName lastName suffix

Ordered by last name, the parser works as follows:

  • 2 elements: lastName firstName
  • 3 elements: lastName firstName middleName
  • 4 elements: prefix lastName firstName middleName
  • 5 elements: prefix lastName firstName middleName suffix

For example, Jane Smith (ordered by first name) is expected to be indexed: ['Jane', 'Smith'].

Constructors

NameIndex.base()
The default or base index for the NameIndex.
const

Properties

firstName int
final
hashCode int
The hash code for this object.
no setterinherited
lastName int
final
middleName int
final
prefix int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

when(NameOrder order, [int count = 2]) NameIndex
Gets the name index for a list of names based on the count of elements and their order of appearance.

Constants

max → const int
The maximum number of parts in a list of names.
min → const int
The minimum number of parts in a list of names.