|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object system.DataTypeIdentifier
public abstract class DataTypeIdentifier
Allows for the data type of the data arraylist to be discovered. Also allows for the validation of various user inputs.
Field Summary | |
---|---|
static java.lang.String[] |
CLASS_NAMES
|
private static java.lang.String |
regExpressionBooleanFalse
|
private static java.lang.String |
regExpressionBooleanTrue
|
private static java.lang.String |
regExpressionCurrency
|
private static java.lang.String |
regExpressionDouble
|
private static java.lang.String |
regExpressionNo
|
private static java.lang.String |
regExpressionNumber
|
private static java.lang.String |
regExpressionYes
|
Constructor Summary | |
---|---|
DataTypeIdentifier()
|
Method Summary | |
---|---|
private static java.util.ArrayList<java.lang.Object> |
checkContent(java.util.ArrayList<java.lang.String> singleRecord)
Checks the content of the single record and assigns the datatype for each column. |
private static void |
checkLoop(java.util.ArrayList<java.lang.Object> temp,
java.util.List<java.lang.Object> dataClass)
Checks the array of datatypes against the established data type array. |
static java.util.ArrayList<java.lang.Object> |
getDataType(java.util.List<java.util.List<java.lang.Object>> dataList)
Gets the data type of the data in the arraylist. |
private static java.util.ArrayList<java.lang.String> |
getSingleRecord(java.util.List<java.util.List<java.lang.Object>> dataList,
int position)
Gets the singles record in the arraylist of records ata certain position. |
static boolean |
testDataType(java.util.ArrayList<java.lang.Object> dataTypeClasses,
java.lang.String value,
int position)
Checks a single value to see if it matches against the data type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] CLASS_NAMES
private static final java.lang.String regExpressionBooleanTrue
private static final java.lang.String regExpressionBooleanFalse
private static final java.lang.String regExpressionYes
private static final java.lang.String regExpressionNo
private static final java.lang.String regExpressionNumber
private static final java.lang.String regExpressionDouble
private static final java.lang.String regExpressionCurrency
Constructor Detail |
---|
public DataTypeIdentifier()
Method Detail |
---|
private static java.util.ArrayList<java.lang.String> getSingleRecord(java.util.List<java.util.List<java.lang.Object>> dataList, int position)
dataList
- the list of records.position
- the position in which the record is to be gotten from.
private static java.util.ArrayList<java.lang.Object> checkContent(java.util.ArrayList<java.lang.String> singleRecord)
singleRecord
- the single record to be checked.
private static void checkLoop(java.util.ArrayList<java.lang.Object> temp, java.util.List<java.lang.Object> dataClass)
temp
- the temp data type array to be checked.dataClass
- the established data array.public static boolean testDataType(java.util.ArrayList<java.lang.Object> dataTypeClasses, java.lang.String value, int position)
dataTypeClasses
- the list of data types supplied.value
- the value to be checked.position
- the position of the value in the array list.
public static java.util.ArrayList<java.lang.Object> getDataType(java.util.List<java.util.List<java.lang.Object>> dataList)
dataList
- the data to be identfied.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |