public class USADriveIdJurisdSubfile
extends java.lang.Object
Class for Jurisdiction specific fields for USA DL
| Modifier and Type | Class and Description |
|---|---|
static class |
USADriveIdJurisdSubfile.DataElement
Represents a jurisdiction-specific data field used in documents,
for example ElementID = "ZVA" with Value = "01".
|
| Constructor and Description |
|---|
USADriveIdJurisdSubfile() |
| Modifier and Type | Method and Description |
|---|---|
USADriveIdJurisdSubfile.DataElement |
addOrReplace(java.lang.String id,
java.lang.String 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.
|
USADriveIdJurisdSubfile.DataElement |
addOrReplace(USADriveIdJurisdSubfile.DataElement node)
Adds new DataElement or replaces it if ElementID already exists.
|
void |
clear()
Clears all data elements
|
USADriveIdJurisdSubfile.DataElement |
findDataElement(java.lang.String id,
boolean isOpenOrCreate)
Searches for data element by 3-letter id
|
USADriveIdJurisdSubfile.DataElement |
get(int index)
Indexing by index number
|
USADriveIdJurisdSubfile.DataElement |
get(java.lang.String id)
Indexing by 3-letter element id
|
USADriveIdJurisdSubfile.DataElement |
insert(int index,
USADriveIdJurisdSubfile.DataElement node)
Inserts the specified DataElement at the given index.
|
boolean |
remove(int index)
Tries to remove element at index
|
boolean |
remove(java.lang.String id)
Tries to remove element with 3-letter id
|
void |
set(int index,
USADriveIdJurisdSubfile.DataElement value)
Indexing by index number
|
void |
set(java.lang.String id,
USADriveIdJurisdSubfile.DataElement value)
Indexing by 3-letter element id
|
int |
size()
Returns number of data elements
|
public final USADriveIdJurisdSubfile.DataElement get(java.lang.String id)
Indexing by 3-letter element id
id - 3-letter element idpublic final void set(java.lang.String id,
USADriveIdJurisdSubfile.DataElement value)
Indexing by 3-letter element id
id - 3-letter element idpublic final USADriveIdJurisdSubfile.DataElement get(int index)
Indexing by index number
index - Element index (int)public final void set(int index,
USADriveIdJurisdSubfile.DataElement value)
Indexing by index number
index - Element index (int)public final USADriveIdJurisdSubfile.DataElement findDataElement(java.lang.String id, boolean isOpenOrCreate)
Searches for data element by 3-letter id
id - 3-letter idisOpenOrCreate - If true, it will be created if not foundpublic final int size()
Returns number of data elements
public final void clear()
Clears all data elements
public final boolean remove(int index)
Tries to remove element at index
index - index numberpublic final boolean remove(java.lang.String id)
Tries to remove element with 3-letter id
id - 3-letter idpublic final USADriveIdJurisdSubfile.DataElement insert(int index, USADriveIdJurisdSubfile.DataElement node)
Inserts the specified DataElement at the given index. If a DataElement with the same ElementID already exists, it will be replaced.
index - The zero-based index at which the element should be inserted.node - The DataElement instance to insert or replace at the target position.public final USADriveIdJurisdSubfile.DataElement addOrReplace(USADriveIdJurisdSubfile.DataElement node)
Adds new DataElement or replaces it if ElementID already exists.
node - DataElement to addpublic final USADriveIdJurisdSubfile.DataElement addOrReplace(java.lang.String id, java.lang.String 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.
id - A 3-letter identifier that uniquely specifies the jurisdiction-related data element.value - The text value assigned to the data element; this value will overwrite the existing one if the element already exists.