asjava.uniclientlibs
Class UniDynArray

java.lang.Object
  extended byasjava.uniclientlibs.UniString
      extended byasjava.uniclientlibs.UniDynArray
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UniRecord

public class UniDynArray
extends UniString
implements java.io.Serializable

UniDynArray is used to control dynamic array interaction. It is important to note that UniDynArray referencing is done in '1'-based notation, meaning the first field is field 1.

Since:
UNICLIENTLIBS 1.0
Version:
Version 1.0
Author:
David T. Meeks
See Also:
Serialized Form

Field Summary
 
Fields inherited from class asjava.uniclientlibs.UniString
count, inPacket, outPacket, uniConnection, uniReturnCode, uniStatus, value
 
Constructor Summary
UniDynArray()
          Constructs a dynamic array with no characters in it
UniDynArray(java.lang.Object aString)
          Constructs a dynamic array with the passed in Object value
UniDynArray(java.lang.String aString)
          Constructs a dynamic array with the passed in Object value
UniDynArray(UniString aString)
           
 
Method Summary
 int count()
          Counts the number of field marks that exist in the array
 int count(int aField)
          Counts the number of value marks that exist in the array
 int count(int aField, int aValue)
          Counts the number of subvalue marks that exist in the array
 int count(int aField, int aValue, int aSubValue)
          Counts the number of text marks that exist in the array
 int dcount()
          Counts the number of fields that exist in the array, equivalent to count() + 1
 int dcount(int aField)
          Counts the number of values that exist in the array at the given field position, equivalent to count( aField ) + 1
 int dcount(int aField, int aValue)
          Counts the number of subvalues that exist in the array at the given field,value position, equivalent to count( aFieldValue, aValue) + 1
 int dcount(int aField, int aValue, int aSubValue)
          Counts the number of text values that exist in the array at the given field,value,subvalue position, equivalent to count() + 1
 void delete(int aField)
          Deletes the given field value from the array
 void delete(int aField, int aValue)
          Deletes the given field/value value from the array
 void delete(int aField, int aValue, int aSubValue)
          Deletes the given field/value/subvalue value from the array
 UniDynArray extract(int aField)
          Extracts a copy of the entire array
 UniDynArray extract(int aField, int aValue)
          Extracts a copy of the requested field
 UniDynArray extract(int aField, int aValue, int aSubValue)
          Extracts a copy of the requested subvalue
 void insert(int aField, int aValue, int aSubValue, java.lang.Object aString)
          Inserts an Object into the dynamic array at the given field,value,subvalue position
 void insert(int aField, int aValue, java.lang.Object aString)
          Inserts an Object into the dynamic array at the given field,value position
 void insert(int aField, java.lang.Object aString)
          Inserts an Object into the dynamic array at the given field position
 int length(int aField)
          Returns the length of the entire dynamic array
 int length(int aField, int aValue)
          Returns the length of the given field,value of the dynamic array
 int length(int aField, int aValue, int aSubValue)
          Returns the length of the given field,value,subvalue of the dynamic array
protected  void regenerateDynArray()
          recreate the dynArray structure
 UniDynArray remove(int aField)
          Performs a delete on the given field, but also returns the deleted field
 UniDynArray remove(int aField, int aValue)
          Performs a delete on the given field/value, but also returns the deleted value
 UniDynArray remove(int aField, int aValue, int aSubValue)
          Performs a delete on the given field/value/subvalue, but also returns the deleted subvalue
 void replace(int aField, int aValue, int aSubValue, java.lang.Object aString)
          Replaces the field/value/subvalue specified with the new data value
 void replace(int aField, int aValue, java.lang.Object aString)
          Replaces the field/value specified with the new data value
 void replace(int aField, java.lang.Object aString)
          Replaces the field specified with the new data value
 void setValue(java.lang.Object newValue)
          replaces the contents of the dynamic array with the given newValue param newValue a String object representing the dynamic array
 void setValue(java.lang.String newValue)
          replaces the contents of the dynamic array with the given newValue param newValue a String object representing the dynamic array
 java.lang.String toString()
          Converts the given UniDynArray into a base String
 
Methods inherited from class asjava.uniclientlibs.UniString
alpha, alpha, append, append, append, append, append, append, append, append, append, append, change, change, change, charAt, compareTo, convert, convert, count, dcount, equals, equalsIgnoreCase, getBytes, getBytes, getChars, getInternalMarkCharacter, getMarkCharacter, iconv, insert, insert, insert, insert, insert, insert, insert, left, length, oconv, quote, quote, right, setCharAt, status, substring, substring, toCharArray, toLowerCase, toUpperCase
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniDynArray

public UniDynArray()
Constructs a dynamic array with no characters in it

Since:
UNICLIENTLIBS 1.0

UniDynArray

public UniDynArray(java.lang.Object aString)
Constructs a dynamic array with the passed in Object value

Parameters:
aString - Object representing the data to be converted into a dynamic array
Since:
UNICLIENTLIBS 1.0

UniDynArray

public UniDynArray(java.lang.String aString)
Constructs a dynamic array with the passed in Object value

Parameters:
aString - Object representing the data to be converted into a dynamic array
Since:
UNICLIENTLIBS 1.0

UniDynArray

public UniDynArray(UniString aString)
Method Detail

count

public int count(int aField,
                 int aValue,
                 int aSubValue)
Counts the number of text marks that exist in the array

Parameters:
aField - integer representing which field mark to count
aValue - integer representing the value position to count
aSubValue - integer representing which subvalue position to count
Returns:
integer representing the number of text mark characters in the array
Since:
UNICLIENTLIBS 1.0

count

public int count(int aField,
                 int aValue)
Counts the number of subvalue marks that exist in the array

Parameters:
aField - integer representing which field mark to count
aValue - integer representing the value position to count
Returns:
integer representing the number of subvalue mark characters in the array
Since:
UNICLIENTLIBS 1.0

count

public int count(int aField)
Counts the number of value marks that exist in the array

Parameters:
aField - integer representing which field mark to count
Returns:
integer representing the number of value mark characters in the array
Since:
UNICLIENTLIBS 1.0

count

public int count()
Counts the number of field marks that exist in the array

Overrides:
count in class UniString
Returns:
integer representing the number of field mark characters in the array
Since:
UNICLIENTLIBS 1.0

dcount

public int dcount(int aField,
                  int aValue,
                  int aSubValue)
Counts the number of text values that exist in the array at the given field,value,subvalue position, equivalent to count() + 1

Parameters:
aField - integer representing which field to count values for
aValue - integer representing which value to use
aSubValue - integer representing which subvalue to use
Returns:
integer representing the number of text values in the array
Since:
UNICLIENTLIBS 1.0

dcount

public int dcount(int aField,
                  int aValue)
Counts the number of subvalues that exist in the array at the given field,value position, equivalent to count( aFieldValue, aValue) + 1

Parameters:
aField - integer representing which field to count values for
aValue - integer representing which value to count subvalues for
Returns:
integer representing the number of subvalue in the field/value of the array
Since:
UNICLIENTLIBS 1.0

dcount

public int dcount(int aField)
Counts the number of values that exist in the array at the given field position, equivalent to count( aField ) + 1

Parameters:
aField - integer representing which field to count values for
Returns:
integer representing the number of value in the field of the array
Since:
UNICLIENTLIBS 1.0

dcount

public int dcount()
Counts the number of fields that exist in the array, equivalent to count() + 1

Overrides:
dcount in class UniString
Returns:
integer representing the number of fields in the array
Since:
UNICLIENTLIBS 1.0

delete

public void delete(int aField,
                   int aValue,
                   int aSubValue)
Deletes the given field/value/subvalue value from the array

Parameters:
aField - integer representing which field to delete
aValue - integer representing which value within the field to delete
aSubValue - integer representing which subvalue within the value to delete
Since:
UNICLIENTLIBS 1.0

delete

public void delete(int aField,
                   int aValue)
Deletes the given field/value value from the array

Parameters:
aField - integer representing which field to delete
aValue - integer representing which value within the field to delete
Since:
UNICLIENTLIBS 1.0

delete

public void delete(int aField)
Deletes the given field value from the array

Parameters:
aField - integer representing which field to delete
Since:
UNICLIENTLIBS 1.0

extract

public UniDynArray extract(int aField,
                           int aValue,
                           int aSubValue)
Extracts a copy of the requested subvalue

Parameters:
aField - integer representing which field to extract
aValue - integer representing which value to extract
aSubValue - integer representing which subvalue to extract
Returns:
UniDynArray representing the requested subvalue
Since:
UNICLIENTLIBS 1.0

extract

public UniDynArray extract(int aField,
                           int aValue)
Extracts a copy of the requested field

Parameters:
aField - integer representing which field to extract
aValue - integer representing which value to extract
Returns:
UniDynArray representing the requested field
Since:
UNICLIENTLIBS 1.0

extract

public UniDynArray extract(int aField)
Extracts a copy of the entire array

Parameters:
aField - integer representing which field to extract
Returns:
UniDynArray representing the requested extraction
Since:
UNICLIENTLIBS 1.0

insert

public void insert(int aField,
                   int aValue,
                   int aSubValue,
                   java.lang.Object aString)
Inserts an Object into the dynamic array at the given field,value,subvalue position

Parameters:
aField - integer representing which field to insert data into
aValue - integer representing which value to insert data into
aSubValue - integer representing which subvalue to insert data into
aString - String representing the data to be inserted
Since:
UNICLIENTLIBS 1.0

insert

public void insert(int aField,
                   int aValue,
                   java.lang.Object aString)
Inserts an Object into the dynamic array at the given field,value position

Parameters:
aField - integer representing which field to insert data into
aValue - integer representing which value to insert data into
aString - String representing the data to be inserted
Since:
UNICLIENTLIBS 1.0

insert

public void insert(int aField,
                   java.lang.Object aString)
Inserts an Object into the dynamic array at the given field position

Overrides:
insert in class UniString
Parameters:
aField - integer representing which field to insert data into
aString - String representing the data to be inserted
Since:
UNICLIENTLIBS 1.0

length

public int length(int aField,
                  int aValue,
                  int aSubValue)
Returns the length of the given field,value,subvalue of the dynamic array

Parameters:
aField - integer representing the field to obtain the length of
aValue - integer representing the value to get the length from
aSubValue - integer representing the subvalue to get the length from
Returns:
integer representing the length of the field,value,subvalue of the dynamic array
Since:
UNICLIENTLIBS 1.0

length

public int length(int aField,
                  int aValue)
Returns the length of the given field,value of the dynamic array

Parameters:
aField - integer representing the field to obtain the length of
aValue - integer representing the value to get the length from
Returns:
integer representing the length of the field,value of the dynamic array
Since:
UNICLIENTLIBS 1.0

length

public int length(int aField)
Returns the length of the entire dynamic array

Parameters:
aField - integer representing which field to insert data into
Returns:
integer representing the length of the dynamic array
Since:
UNICLIENTLIBS 1.0

remove

public UniDynArray remove(int aField,
                          int aValue,
                          int aSubValue)
Performs a delete on the given field/value/subvalue, but also returns the deleted subvalue

Parameters:
aField - integer representing the field to remove
aValue - integer representing the value to remove
aSubValue - integer representing the subvalue to remove
Returns:
UniDynArray representing the deleted subvalue from the array
Since:
UNICLIENTLIBS 1.0

remove

public UniDynArray remove(int aField,
                          int aValue)
Performs a delete on the given field/value, but also returns the deleted value

Parameters:
aField - integer representing the field to remove
aValue - integer representing the value to remove
Returns:
UniDynArray representing the deleted value from the array
Since:
UNICLIENTLIBS 1.0

remove

public UniDynArray remove(int aField)
Performs a delete on the given field, but also returns the deleted field

Parameters:
aField - integer representing the field to remove
Returns:
UniDynArray representing the deleted field from the array
Since:
UNICLIENTLIBS 1.0

replace

public void replace(int aField,
                    int aValue,
                    int aSubValue,
                    java.lang.Object aString)
Replaces the field/value/subvalue specified with the new data value

Parameters:
aField - integer representing the field to replace
aValue - integer representing the value to replace
aSubValue - representing the subvalue to replace
aString - Object representing the new data value
Since:
UNICLIENTLIBS 1.0

replace

public void replace(int aField,
                    int aValue,
                    java.lang.Object aString)
Replaces the field/value specified with the new data value

Parameters:
aField - integer representing the field to replace
aValue - integer representing the value to replace
aString - Object representing the new data value
Since:
UNICLIENTLIBS 1.0

replace

public void replace(int aField,
                    java.lang.Object aString)
Replaces the field specified with the new data value

Parameters:
aField - integer representing the field to replace
aString - Object representing the new data value
Since:
UNICLIENTLIBS 1.0

setValue

public void setValue(java.lang.Object newValue)
replaces the contents of the dynamic array with the given newValue param newValue a String object representing the dynamic array

Overrides:
setValue in class UniString
Returns:
current status value
Since:
UNICLIENTLIBS 1.0

setValue

public void setValue(java.lang.String newValue)
replaces the contents of the dynamic array with the given newValue param newValue a String object representing the dynamic array

Overrides:
setValue in class UniString
Returns:
current status value
Since:
UNICLIENTLIBS 1.0

toString

public java.lang.String toString()
Converts the given UniDynArray into a base String

Overrides:
toString in class UniString
Returns:
a String object representing the dynamic array
Since:
UNICLIENTLIBS 1.0

regenerateDynArray

protected void regenerateDynArray()
recreate the dynArray structure

Since:
UNICLIENTLIBS 1.0