USADriveIdJurisdSubfile

USADriveIdJurisdSubfile class

Class for Jurisdiction specific fields for USA DL

new USADriveIdJurisdSubfile()

Methods

NameDescription
addOrReplace(id, value)Adds a new DataElement with the specified identifier and value, or replaces the existing element if an entry with the sa
addOrReplaceNode(node)Adds new DataElement or replaces it if ElementID already exists.
clear()Clears all data elements
findDataElement(id, isOpenOrCreate)Searches for data element by 3-letter id
get(indexOrId)Gets a data element by its index or 3-letter ID.
insert(index, node)Inserts the specified DataElement at the given index. If a DataElement with the same ElementID already exists, it will b
remove(indexOrId)Tries to remove an element by its index or 3-letter ID.
set(indexOrId, value)Sets a data element by its index or 3-letter ID.
size()Returns number of data elements

addOrReplace(id, value)

Adds a new DataElement with the specified identifier and value, or replaces the existing element if an entry with the same ElementID is already present.

ParameterDescription
idA 3-letter identifier that uniquely specifies the jurisdiction-related data element.
valueThe text value assigned to the data element; this value will overwrite the existing one if the element already exists.

Returns: The DataElement instance that was added to the collection or updated in place.

addOrReplaceNode(node)

Adds new DataElement or replaces it if ElementID already exists.

ParameterDescription
nodeDataElement to add

Returns: Added/replaced data element

clear()

Clears all data elements

findDataElement(id, isOpenOrCreate)

Searches for data element by 3-letter id

ParameterDescription
id3-letter id
isOpenOrCreateIf true, it will be created if not found

Returns: Found data element

get(indexOrId)

Gets a data element by its index or 3-letter ID.

ParameterTypeDescription
indexOrIdnumber|stringInteger index or 3-letter element ID.

Returns: DataElement — Corresponding data element.

insert(index, node)

Inserts the specified DataElement at the given index. If a DataElement with the same ElementID already exists, it will be replaced.

ParameterDescription
indexThe zero-based index at which the element should be inserted.
nodeThe DataElement instance to insert or replace at the target position.

Returns: The DataElement that was inserted or used to replace an existing entry.

remove(indexOrId)

Tries to remove an element by its index or 3-letter ID.

ParameterTypeDescription
indexOrIdnumber|stringInteger index or 3-letter element ID.

Returns: boolean — true if the element was removed; otherwise, false.

set(indexOrId, value)

Sets a data element by its index or 3-letter ID.

ParameterTypeDescription
indexOrIdnumber|stringInteger index or 3-letter element ID.
valueDataElementData element to set.

size()

Returns number of data elements