@Test public void testIsNumeric() { int[] numTypes = { ValueMetaInterface.TYPE_INTEGER, ValueMetaInterface.TYPE_NUMBER, ValueMetaInterface.TYPE_BIGNUMBER }; for ( int type : numTypes ) { assertTrue( Integer.toString( type ), ValueMetaBase.isNumeric( type ) ); } int[] notNumTypes = { ValueMetaInterface.TYPE_INET, ValueMetaInterface.TYPE_BOOLEAN, ValueMetaInterface.TYPE_BINARY, ValueMetaInterface.TYPE_DATE, ValueMetaInterface.TYPE_STRING }; for ( int type : notNumTypes ) { Assert.assertFalse( Integer.toString( type ), ValueMetaBase.isNumeric( type ) ); } }
@Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase();  ValueMetaBase( String name );  ValueMetaBase( String name, int type );  ValueMetaBase( String name, int type, int length, int precision );  ValueMetaBase( Node node ); @Deprecated  ValueMetaBase( DataInputStream inputStream ); @Deprecated  ValueMetaBase( String name, int type, int storageType ); }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase();  ValueMetaBase( String name );  ValueMetaBase( String name, int type );  ValueMetaBase( String name, int type, int length, int precision );  ValueMetaBase( Node node ); @Deprecated  ValueMetaBase( DataInputStream inputStream ); @Deprecated  ValueMetaBase( String name, int type, int storageType ); @Override ValueMetaBase clone(); @Override String getComments(); @Override void setComments( String comments ); @Override Object[] getIndex(); @Override void setIndex( Object[] index ); @Override int getLength(); @Override void setLength( int length ); @Override void setLength( int length, int precision ); @Override String getName(); @Override void setName( String name ); @Override String getOrigin(); @Override void setOrigin( String origin ); @Override int getPrecision(); @Override void setPrecision( int precision ); @Override int getStorageType(); @Override void setStorageType( int storageType ); @Override boolean isStorageNormal(); @Override boolean isStorageIndexed(); @Override boolean isStorageBinaryString(); @Override int getType(); @Override @Deprecated void setType( int type ); @Override @Deprecated String getConversionMask(); @Override void setConversionMask( String conversionMask ); @Override String getStringEncoding(); @Override void setStringEncoding( String encoding ); @Override String getDecimalSymbol(); @Override void setDecimalSymbol( String decimalSymbol ); @Override String getGroupingSymbol(); @Override void setGroupingSymbol( String groupingSymbol ); @Override String getCurrencySymbol(); @Override void setCurrencySymbol( String currencySymbol ); @Override boolean isCaseInsensitive(); @Override void setCaseInsensitive( boolean caseInsensitive ); @Override boolean isCollatorDisabled(); @Override void setCollatorDisabled( boolean collatorDisabled ); @Override Locale getCollatorLocale(); @Override void setCollatorLocale( Locale locale ); @Override int getCollatorStrength(); @Override void setCollatorStrength( int collatorStrength ); @Override boolean isSortedDescending(); @Override void setSortedDescending( boolean sortedDescending ); @Override boolean isOutputPaddingEnabled(); @Override void setOutputPaddingEnabled( boolean outputPaddingEnabled ); @Override boolean isLargeTextField(); @Override void setLargeTextField( boolean largeTextField ); @Override boolean isDateFormatLenient(); @Override void setDateFormatLenient( boolean dateFormatLenient ); @Override Locale getDateFormatLocale(); @Override void setDateFormatLocale( Locale dateFormatLocale ); @Override synchronized SimpleDateFormat getDateFormat(); @Override synchronized DecimalFormat getDecimalFormat(); @Override synchronized DecimalFormat getDecimalFormat( boolean useBigDecimal ); @Override String getFormatMask(); static Boolean convertStringToBoolean( String string ); @Override Object convertToNormalStorageType( Object object ); @Override Object convertToBinaryStringStorageType( Object object ); @Override Object convertBinaryStringToNativeType( byte[] binary ); @Override Object convertNormalStorageTypeToBinaryString( Object object ); @Override Object cloneValueData( Object object ); @Override String getCompatibleString( Object object ); @Override String getString( Object object ); @Override Double getNumber( Object object ); @Override Long getInteger( Object object ); @Override BigDecimal getBigNumber( Object object ); @Override Boolean getBoolean( Object object ); @Override Date getDate( Object object ); @Override byte[] getBinary( Object object ); @Override byte[] getBinaryString( Object object ); @Override boolean isString(); @Override boolean isDate(); @Override boolean isBigNumber(); @Override boolean isNumber(); @Override boolean isBoolean(); @Override boolean isSerializableType(); @Override boolean isBinary(); @Override boolean isInteger(); @Override boolean isNumeric(); static final boolean isNumeric( int t ); boolean isSortedAscending(); @Override String getTypeDesc(); String getStorageTypeDesc(); @Override String toString(); @Override String toStringMeta(); @Override void writeData( DataOutputStream outputStream, Object object ); @Override Object readData( DataInputStream inputStream ); @Override void writeMeta( DataOutputStream outputStream ); @Override void readMetaData( DataInputStream inputStream ); @Override String getMetaXML(); @Override String getDataXML( Object object ); @Override Object getValue( Node node ); static final String[] getTypes(); static final String[] getAllTypes(); static final String getTypeDesc( int type ); static final int getType( String desc ); static final int getStorageType( String desc ); static final String getStorageTypeCode( int storageType ); @Override boolean isNull( Object data ); @Override int compare( Object data1, Object data2 ); @Override int compare( Object data1, ValueMetaInterface meta2, Object data2 ); @Override Object convertData( ValueMetaInterface meta2, Object data2 ); @Override Object convertDataCompatible( ValueMetaInterface meta2, Object data2 ); @Override Object convertDataUsingConversionMetaData( Object data ); @Override Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull,
      int trim_type ); @Override int hashCode( Object object ); @Override Value createOriginalValue( Object data ); @Override Object getValueData( Value value ); @Override ValueMetaInterface getStorageMetadata(); @Override void setStorageMetadata( ValueMetaInterface storageMetadata ); @Override int getTrimType(); @Override void setTrimType( int trimType ); static final int getTrimTypeByCode( String tt ); static final int getTrimTypeByDesc( String tt ); static final String getTrimTypeCode( int i ); static final String getTrimTypeDesc( int i ); @Override ValueMetaInterface getConversionMetadata(); @Override void setConversionMetadata( ValueMetaInterface conversionMetadata ); @Override boolean isSingleByteEncoding(); @Override long getNumberOfBinaryStringConversions(); @Override void setNumberOfBinaryStringConversions( long numberOfBinaryStringConversions ); @Override boolean isOriginalAutoIncrement(); @Override void setOriginalAutoIncrement( boolean originalAutoIncrement ); @Override int getOriginalColumnType(); @Override void setOriginalColumnType( int originalColumnType ); @Override String getOriginalColumnTypeName(); @Override void setOriginalColumnTypeName( String originalColumnTypeName ); @Override int isOriginalNullable(); @Override void setOriginalNullable( int originalNullable ); @Override int getOriginalPrecision(); @Override void setOriginalPrecision( int originalPrecision ); @Override int getOriginalScale(); @Override void setOriginalScale( int originalScale ); @Override boolean isOriginalSigned(); @Override void setOriginalSigned( boolean originalSigned ); boolean isBigNumberFormatting(); void setBigNumberFormatting( boolean bigNumberFormatting ); static String[] getTrimTypeCodes(); static String[] getTrimTypeDescriptions(); @Override boolean requiresRealClone(); @Override boolean isLenientStringToNumber(); @Override void setLenientStringToNumber( boolean lenientStringToNumber ); @Override TimeZone getDateFormatTimeZone(); @Override void setDateFormatTimeZone( TimeZone dateFormatTimeZone ); @Override void drawValue( PrimitiveGCInterface gc, Object value ); @SuppressWarnings( "fallthrough" ) @Override ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm,
      int index, boolean ignoreLength, boolean lazyConversion ); @Override Object getValueFromResultSet( DatabaseInterface databaseInterface, ResultSet resultSet, int index ); @Override void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index,
      Object data ); @Override Object getNativeDataType( Object object ); @Override String getDatabaseColumnTypeDefinition( DatabaseInterface databaseInterface, String tk, String pk,
      boolean use_autoinc, boolean add_fieldname, boolean add_cr ); @Override Class<?> getNativeDataTypeClass(); }
ValueMetaBase implements ValueMetaInterface { @Override public boolean isNumeric() { return isInteger() || isNumber() || isBigNumber(); } ValueMetaBase();  ValueMetaBase( String name );  ValueMetaBase( String name, int type );  ValueMetaBase( String name, int type, int length, int precision );  ValueMetaBase( Node node ); @Deprecated  ValueMetaBase( DataInputStream inputStream ); @Deprecated  ValueMetaBase( String name, int type, int storageType ); @Override ValueMetaBase clone(); @Override String getComments(); @Override void setComments( String comments ); @Override Object[] getIndex(); @Override void setIndex( Object[] index ); @Override int getLength(); @Override void setLength( int length ); @Override void setLength( int length, int precision ); @Override String getName(); @Override void setName( String name ); @Override String getOrigin(); @Override void setOrigin( String origin ); @Override int getPrecision(); @Override void setPrecision( int precision ); @Override int getStorageType(); @Override void setStorageType( int storageType ); @Override boolean isStorageNormal(); @Override boolean isStorageIndexed(); @Override boolean isStorageBinaryString(); @Override int getType(); @Override @Deprecated void setType( int type ); @Override @Deprecated String getConversionMask(); @Override void setConversionMask( String conversionMask ); @Override String getStringEncoding(); @Override void setStringEncoding( String encoding ); @Override String getDecimalSymbol(); @Override void setDecimalSymbol( String decimalSymbol ); @Override String getGroupingSymbol(); @Override void setGroupingSymbol( String groupingSymbol ); @Override String getCurrencySymbol(); @Override void setCurrencySymbol( String currencySymbol ); @Override boolean isCaseInsensitive(); @Override void setCaseInsensitive( boolean caseInsensitive ); @Override boolean isCollatorDisabled(); @Override void setCollatorDisabled( boolean collatorDisabled ); @Override Locale getCollatorLocale(); @Override void setCollatorLocale( Locale locale ); @Override int getCollatorStrength(); @Override void setCollatorStrength( int collatorStrength ); @Override boolean isSortedDescending(); @Override void setSortedDescending( boolean sortedDescending ); @Override boolean isOutputPaddingEnabled(); @Override void setOutputPaddingEnabled( boolean outputPaddingEnabled ); @Override boolean isLargeTextField(); @Override void setLargeTextField( boolean largeTextField ); @Override boolean isDateFormatLenient(); @Override void setDateFormatLenient( boolean dateFormatLenient ); @Override Locale getDateFormatLocale(); @Override void setDateFormatLocale( Locale dateFormatLocale ); @Override synchronized SimpleDateFormat getDateFormat(); @Override synchronized DecimalFormat getDecimalFormat(); @Override synchronized DecimalFormat getDecimalFormat( boolean useBigDecimal ); @Override String getFormatMask(); static Boolean convertStringToBoolean( String string ); @Override Object convertToNormalStorageType( Object object ); @Override Object convertToBinaryStringStorageType( Object object ); @Override Object convertBinaryStringToNativeType( byte[] binary ); @Override Object convertNormalStorageTypeToBinaryString( Object object ); @Override Object cloneValueData( Object object ); @Override String getCompatibleString( Object object ); @Override String getString( Object object ); @Override Double getNumber( Object object ); @Override Long getInteger( Object object ); @Override BigDecimal getBigNumber( Object object ); @Override Boolean getBoolean( Object object ); @Override Date getDate( Object object ); @Override byte[] getBinary( Object object ); @Override byte[] getBinaryString( Object object ); @Override boolean isString(); @Override boolean isDate(); @Override boolean isBigNumber(); @Override boolean isNumber(); @Override boolean isBoolean(); @Override boolean isSerializableType(); @Override boolean isBinary(); @Override boolean isInteger(); @Override boolean isNumeric(); static final boolean isNumeric( int t ); boolean isSortedAscending(); @Override String getTypeDesc(); String getStorageTypeDesc(); @Override String toString(); @Override String toStringMeta(); @Override void writeData( DataOutputStream outputStream, Object object ); @Override Object readData( DataInputStream inputStream ); @Override void writeMeta( DataOutputStream outputStream ); @Override void readMetaData( DataInputStream inputStream ); @Override String getMetaXML(); @Override String getDataXML( Object object ); @Override Object getValue( Node node ); static final String[] getTypes(); static final String[] getAllTypes(); static final String getTypeDesc( int type ); static final int getType( String desc ); static final int getStorageType( String desc ); static final String getStorageTypeCode( int storageType ); @Override boolean isNull( Object data ); @Override int compare( Object data1, Object data2 ); @Override int compare( Object data1, ValueMetaInterface meta2, Object data2 ); @Override Object convertData( ValueMetaInterface meta2, Object data2 ); @Override Object convertDataCompatible( ValueMetaInterface meta2, Object data2 ); @Override Object convertDataUsingConversionMetaData( Object data ); @Override Object convertDataFromString( String pol, ValueMetaInterface convertMeta, String nullIf, String ifNull,
      int trim_type ); @Override int hashCode( Object object ); @Override Value createOriginalValue( Object data ); @Override Object getValueData( Value value ); @Override ValueMetaInterface getStorageMetadata(); @Override void setStorageMetadata( ValueMetaInterface storageMetadata ); @Override int getTrimType(); @Override void setTrimType( int trimType ); static final int getTrimTypeByCode( String tt ); static final int getTrimTypeByDesc( String tt ); static final String getTrimTypeCode( int i ); static final String getTrimTypeDesc( int i ); @Override ValueMetaInterface getConversionMetadata(); @Override void setConversionMetadata( ValueMetaInterface conversionMetadata ); @Override boolean isSingleByteEncoding(); @Override long getNumberOfBinaryStringConversions(); @Override void setNumberOfBinaryStringConversions( long numberOfBinaryStringConversions ); @Override boolean isOriginalAutoIncrement(); @Override void setOriginalAutoIncrement( boolean originalAutoIncrement ); @Override int getOriginalColumnType(); @Override void setOriginalColumnType( int originalColumnType ); @Override String getOriginalColumnTypeName(); @Override void setOriginalColumnTypeName( String originalColumnTypeName ); @Override int isOriginalNullable(); @Override void setOriginalNullable( int originalNullable ); @Override int getOriginalPrecision(); @Override void setOriginalPrecision( int originalPrecision ); @Override int getOriginalScale(); @Override void setOriginalScale( int originalScale ); @Override boolean isOriginalSigned(); @Override void setOriginalSigned( boolean originalSigned ); boolean isBigNumberFormatting(); void setBigNumberFormatting( boolean bigNumberFormatting ); static String[] getTrimTypeCodes(); static String[] getTrimTypeDescriptions(); @Override boolean requiresRealClone(); @Override boolean isLenientStringToNumber(); @Override void setLenientStringToNumber( boolean lenientStringToNumber ); @Override TimeZone getDateFormatTimeZone(); @Override void setDateFormatTimeZone( TimeZone dateFormatTimeZone ); @Override void drawValue( PrimitiveGCInterface gc, Object value ); @SuppressWarnings( "fallthrough" ) @Override ValueMetaInterface getValueFromSQLType( DatabaseMeta databaseMeta, String name, java.sql.ResultSetMetaData rm,
      int index, boolean ignoreLength, boolean lazyConversion ); @Override Object getValueFromResultSet( DatabaseInterface databaseInterface, ResultSet resultSet, int index ); @Override void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index,
      Object data ); @Override Object getNativeDataType( Object object ); @Override String getDatabaseColumnTypeDefinition( DatabaseInterface databaseInterface, String tk, String pk,
      boolean use_autoinc, boolean add_fieldname, boolean add_cr ); @Override Class<?> getNativeDataTypeClass(); static final String DEFAULT_INTEGER_PARSE_MASK; static final String DEFAULT_NUMBER_PARSE_MASK; static final String DEFAULT_BIGNUMBER_PARSE_MASK; static final String DEFAULT_DATE_PARSE_MASK; static final String DEFAULT_TIMESTAMP_PARSE_MASK; static final String DEFAULT_INTEGER_FORMAT_MASK; static final String DEFAULT_NUMBER_FORMAT_MASK; static final String DEFAULT_BIG_NUMBER_FORMAT_MASK; static final String DEFAULT_DATE_FORMAT_MASK; static final String DEFAULT_TIMESTAMP_FORMAT_MASK; static final String XML_META_TAG; static final String XML_DATA_TAG; static final String COMPATIBLE_DATE_FORMAT_PATTERN; static final boolean EMPTY_STRING_AND_NULL_ARE_DIFFERENT; static final String[] trimTypeCode; static final String[] trimTypeDesc; static final String[] SINGLE_BYTE_ENCODINGS; }