public final class JDynArray
extends java.lang.Object
implements java.lang.Cloneable, java.io.Externalizable
Constructor and Description |
---|
JDynArray()
Default constructor
|
JDynArray(JDynArray src)
Constructs a dynamic array from another dynamic array
|
JDynArray(java.lang.String src)
Constructs a dynamic array from a string
|
Modifier and Type | Method and Description |
---|---|
void |
assign(JDynArray src)
Assigns the value of a dynamic array to this dynamic array
|
void |
assign(java.lang.String src)
Assigns a string value to this dynamic array
|
char |
charAt(int index)
Gets a character at a given position in the dynamic array
|
java.lang.Object |
clone() |
int |
count(char delim)
Counts the number of given characters in this dynamic array
|
int |
count(java.lang.String delim)
Counts the number of given delimiters in this dynamic array
|
int |
dcount(char delim)
Counts the number of fields separated by the given character
|
int |
dcount(java.lang.String delim)
Counts the number of fields separated by the given delimiter
|
void |
delete(int amc)
Deletes the specified attribute
|
void |
delete(int amc,
int vmc)
Deletes the specified attribute or value
|
void |
delete(int amc,
int vmc,
int svmc)
Deletes the specified attribute, value or sub-value
|
java.lang.String |
extract(int amc)
Extracts the specified attribute as a string
|
java.lang.String |
extract(int amc,
int vmc)
Extracts the specified attribute or value as a string
|
java.lang.String |
extract(int amc,
int vmc,
int svmc)
Extracts the specified attribute, value or sub-value as a string
|
JDynArray |
extractDA(int amc)
Extracts the specified attribute as a dynamic array
|
JDynArray |
extractDA(int amc,
int vmc)
Extracts the specified attribute or value as a dynamic array
|
JDynArray |
extractDA(int amc,
int vmc,
int svmc)
Extracts the specified attribute, value or sub-value as a dynamic array
|
java.lang.String |
field(char delim,
int fieldNo)
Extracts the specified field separated by the given delimiter character
|
java.lang.String |
field(java.lang.String delim,
int fieldNo)
Extracts the specified field separated by the given delimiter string
|
java.lang.String |
getString()
Retrieves the content of the dynamic array as a string
|
void |
insert(JDynArray data,
int amc)
Inserts data from the given dynamic array into the specified
attribute
|
void |
insert(JDynArray data,
int amc,
int vmc)
Inserts data from the given dynamic array into the specified
attribute or value
|
void |
insert(JDynArray data,
int amc,
int vmc,
int svmc)
Inserts data from the given dynamic array into the specified
attribute, value or sub-value
|
void |
insert(java.lang.String data,
int amc)
Inserts string data into the specified attribute
|
void |
insert(java.lang.String data,
int amc,
int vmc)
Inserts string data into the specified
attribute or value
|
void |
insert(java.lang.String data,
int amc,
int vmc,
int svmc)
Inserts string data into the specified
attribute, value or sub-value
|
void |
insertDA(JDynArray data,
int amc)
Inserts data from the given dynamic array into the specified
attribute.
|
void |
insertDA(JDynArray data,
int amc,
int vmc)
Inserts data from the given dynamic array into the specified
attribute or value.
|
void |
insertDA(JDynArray data,
int amc,
int vmc,
int svmc)
Inserts data from the given dynamic array into the specified
attribute, value or sub-value.
|
int |
length()
Returns the length, in characters, of a dynamic array
|
int |
locate(java.lang.String searchStr)
Searches for a string in all attributes of the dynamic array
|
int |
locate(java.lang.String searchStr,
int amc,
int vmc,
java.lang.String order)
Searches for a string in all sub-values within a given value of the dynamic array.
|
int |
locate(java.lang.String searchStr,
int amc,
int vmc,
java.lang.String order,
int start)
Similar to
locate(String, int, int, String) , but allows for a start position |
int |
locate(java.lang.String searchStr,
int amc,
java.lang.String order)
Searches for a string in all values within a given attribute of the dynamic array.
|
int |
locate(java.lang.String searchStr,
int amc,
java.lang.String order,
int start)
Similar to
locate(String, int, String) , but allows for a start position |
int |
locate(java.lang.String searchStr,
java.lang.String order)
Searches for a string in all attributes of the dynamic array, which is
in a given sort order
|
int |
locateIgnoreCase(java.lang.String searchStr)
Similar to
locate(String) , but performs a case-insensitive comparison |
int |
locateIgnoreCase(java.lang.String searchStr,
int amc,
int vmc,
java.lang.String order)
Similar to
locate(String, int, int, String) , but performs a case-insensitive comparison |
int |
locateIgnoreCase(java.lang.String searchStr,
int amc,
int vmc,
java.lang.String order,
int start)
Similar to
locate(String, int, int, String, int) , but performs a case-insensitive comparison |
int |
locateIgnoreCase(java.lang.String searchStr,
int amc,
java.lang.String order)
Similar to
locate(String, int, String) , but performs a case-insensitive comparison |
int |
locateIgnoreCase(java.lang.String searchStr,
int amc,
java.lang.String order,
int start)
Similar to
locate(String, int, String, int) , but performs a case-insensitive comparison |
int |
locateIgnoreCase(java.lang.String searchStr,
java.lang.String order)
Similar to
locate(String, String) , but performs a case-insensitive comparison |
void |
readExternal(java.io.ObjectInput in) |
void |
replace(JDynArray data,
int amc)
Replaces the given attribute
with the content of specified dynamic array
|
void |
replace(JDynArray data,
int amc,
int vmc)
Replaces the given attribute or value
with the content of specified dynamic array
|
void |
replace(JDynArray data,
int amc,
int vmc,
int svmc)
Replaces the given attribute, value or sub-value
with the content of specified dynamic array
|
void |
replace(java.lang.String data,
int amc)
Replaces the given attribute
with specified string
|
void |
replace(java.lang.String data,
int amc,
int vmc)
Replaces the given attribute or value
with specified string
|
void |
replace(java.lang.String data,
int amc,
int vmc,
int svmc)
Replaces the given attribute, value or sub-value
with specified string
|
void |
replaceDA(JDynArray data,
int amc)
Replaces the given attribute
with the content of specified dynamic array
Same as replace(JDynArray, amc)
|
void |
replaceDA(JDynArray data,
int amc,
int vmc)
Replaces the given attribute or value
with the content of specified dynamic array
Same as replace(JDynArray, amc, vmc)
|
void |
replaceDA(JDynArray data,
int amc,
int vmc,
int svmc)
Replaces the given attribute, value or sub-value
with the content of specified dynamic array.
|
void |
setCharAt(int index,
char newChar)
Sets a character at a given location in the dynamic array
|
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
public JDynArray() throws JException
JException
public JDynArray(java.lang.String src) throws JException
src
- Source stringJException
public JDynArray(JDynArray src) throws JException
src
- Source dynamic arrayJException
public void assign(JDynArray src) throws JException
src
- Source dynamic arrayJException
public void assign(java.lang.String src) throws JException
src
- Source stringJException
public int count(char delim) throws JException
delim
- Delimiter charJException
public int count(java.lang.String delim) throws JException
delim
- Delimiter stringJException
public int dcount(char delim) throws JException
delim
- Delimiter charJException
public int dcount(java.lang.String delim) throws JException
delim
- Delimiter stringJException
public void delete(int amc, int vmc, int svmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0svmc
- Sub-value. This parameter can be 0JException
public void delete(int amc, int vmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0JException
public void delete(int amc) throws JException
amc
- AttributeJException
public JDynArray extractDA(int amc, int vmc, int svmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0svmc
- Sub-value. This parameter can be 0JException
public JDynArray extractDA(int amc, int vmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0JException
public JDynArray extractDA(int amc) throws JException
amc
- AttributeJException
public java.lang.String extract(int amc, int vmc, int svmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0svmc
- Sub-value. This parameter can be 0JException
public java.lang.String extract(int amc, int vmc) throws JException
amc
- Attributevmc
- Value. This parameter can be 0JException
public java.lang.String extract(int amc) throws JException
amc
- AttributeJException
public java.lang.String field(char delim, int fieldNo) throws JException
delim
- DelimiterfieldNo
- Field number to extractJException
public java.lang.String field(java.lang.String delim, int fieldNo) throws JException
delim
- DelimiterfieldNo
- Field number to extractJException
public void insertDA(JDynArray data, int amc, int vmc, int svmc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to insert at
the end of the dynamic arrayJException
insert(JDynArray, int, int, int)
public void insertDA(JDynArray data, int amc, int vmc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arrayJException
insert(JDynArray, int, int)
public void insertDA(JDynArray data, int amc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
insert(JDynArray, int)
public void insert(JDynArray data, int amc, int vmc, int svmc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to insert at
the end of the dynamic arrayJException
public void insert(JDynArray data, int amc, int vmc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arrayJException
public void insert(JDynArray data, int amc) throws JException
data
- Dynamic array to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
public void insert(java.lang.String data, int amc, int vmc, int svmc) throws JException
data
- String to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to insert at
the end of the dynamic arrayJException
public void insert(java.lang.String data, int amc, int vmc) throws JException
data
- String to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to insert at the
end of the dynamic arrayJException
public void insert(java.lang.String data, int amc) throws JException
data
- String to insertamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
public int length() throws JException
JException
public void replaceDA(JDynArray data, int amc, int vmc, int svmc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to append the data at
the end of the dynamic arrayJException
replace(JDynArray, int, int, int)
public void replaceDA(JDynArray data, int amc, int vmc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arrayJException
replace(JDynArray, int, int)
public void replaceDA(JDynArray data, int amc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
replace(JDynArray, int)
public void replace(JDynArray data, int amc, int vmc, int svmc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to append the data at
the end of the dynamic arrayJException
public void replace(JDynArray data, int amc, int vmc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arrayJException
public void replace(JDynArray data, int amc) throws JException
data
- Dynamic array used for replacementamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
public void replace(java.lang.String data, int amc, int vmc, int svmc) throws JException
data
- Replacement stringamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arraysvmc
- Sub-value. This parameter can be 0 or -1 to append the data at
the end of the dynamic arrayJException
public void replace(java.lang.String data, int amc, int vmc) throws JException
data
- Replacement stringamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayvmc
- Value. This parameter can be 0 or -1 to append the data at the
end of the dynamic arrayJException
public void replace(java.lang.String data, int amc) throws JException
data
- Replacement stringamc
- Attribute. This parameter can be -1 to append data at the
end of the dynamic arrayJException
public java.lang.String getString() throws JException
JException
public java.lang.String toString()
toString
in class java.lang.Object
public char charAt(int index) throws JException
index
- Character indexJException
public void setCharAt(int index, char newChar) throws JException
index
- Position of the characternewChar
- Character to setJException
public int locate(java.lang.String searchStr) throws JException
searchStr
- String to look forJException
public int locate(java.lang.String searchStr, java.lang.String order) throws JException
searchStr
- String to look fororder
- Order of the array, interpreted as follows:
"AL" - ascending, left-justified
"AR" - ascending, right-justified
"AN" - ascending, numeric
"DL" - descending, left-justified
"DR" - descending, right-justified
"DN" - descending, numeric
"" - no order
JException
public int locate(java.lang.String searchStr, int amc, java.lang.String order) throws JException
searchStr
- String to look foramc
- Attribute numberorder
- Order of values, interpreted as follows:
"AL" - ascending, left-justified
"AR" - ascending, right-justified
"AN" - ascending, numeric
"DL" - descending, left-justified
"DR" - descending, right-justified
"DN" - descending, numeric
"" - no order
JException
public int locate(java.lang.String searchStr, int amc, int vmc, java.lang.String order) throws JException
searchStr
- String to look foramc
- Attribute numbervmc
- Value numberorder
- Order of values, interpreted as follows:
"AL" - ascending, left-justified
"AR" - ascending, right-justified
"AN" - ascending, numeric
"DL" - descending, left-justified
"DR" - descending, right-justified
"DN" - descending, numeric
"" - no order
JException
public int locate(java.lang.String searchStr, int amc, java.lang.String order, int start) throws JException
locate(String, int, String)
, but allows for a start positionstart
- Start position of the searchJException
public int locate(java.lang.String searchStr, int amc, int vmc, java.lang.String order, int start) throws JException
locate(String, int, int, String)
, but allows for a start positionstart
- Start position of the searchJException
public int locateIgnoreCase(java.lang.String searchStr) throws JException
locate(String)
, but performs a case-insensitive comparisonJException
public int locateIgnoreCase(java.lang.String searchStr, java.lang.String order) throws JException
locate(String, String)
, but performs a case-insensitive comparisonJException
public int locateIgnoreCase(java.lang.String searchStr, int amc, java.lang.String order) throws JException
locate(String, int, String)
, but performs a case-insensitive comparisonJException
public int locateIgnoreCase(java.lang.String searchStr, int amc, int vmc, java.lang.String order) throws JException
locate(String, int, int, String)
, but performs a case-insensitive comparisonJException
public int locateIgnoreCase(java.lang.String searchStr, int amc, java.lang.String order, int start) throws JException
locate(String, int, String, int)
, but performs a case-insensitive comparisonJException
public int locateIgnoreCase(java.lang.String searchStr, int amc, int vmc, java.lang.String order, int start) throws JException
locate(String, int, int, String, int)
, but performs a case-insensitive comparisonJException
public java.lang.Object clone()
clone
in class java.lang.Object
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException