Revision 2088 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/DataType.java
DataType.java | ||
---|---|---|
23 | 23 |
*/ |
24 | 24 |
package org.gvsig.tools.dataTypes; |
25 | 25 |
|
26 |
import org.gvsig.tools.dataTypes.impl.coercion.CoerceToLocale; |
|
26 | 27 |
import org.gvsig.tools.util.LabeledValue; |
27 | 28 |
|
28 | 29 |
public interface DataType extends LabeledValue<DataType>, org.gvsig.tools.lang.Cloneable { |
29 | 30 |
|
31 |
|
|
32 |
public static final int FLAG_NONE = 0; |
|
33 |
public static final int FLAG_NUMBER = 1; // byte, int, long, float, double, decimal |
|
34 |
public static final int FLAG_SUPPORT_PRECISION = 2; // byte, int, long, float, double, decimal |
|
35 |
public static final int FLAG_SUPPORT_SCALE = 4; // float, double, decimal |
|
36 |
public static final int FLAG_PREDEFINED_PRECISION = 8; // byte, int, long, float, double |
|
37 |
public static final int FLAG_SUPPORT_SIZE = 16; // String, byte[] |
|
38 |
public static final int FLAG_FLOATING_POINT = 32; // float, double |
|
39 |
|
|
40 |
/** |
|
41 |
* Without scale asigned |
|
42 |
*/ |
|
43 |
public static final int SCALE_NONE = -1; |
|
44 |
|
|
45 |
public static final int PRECISION_NONE = -1; |
|
46 |
|
|
30 | 47 |
public static final int BYTE_MAX_PRECISION = 3; // max byte 255 |
31 | 48 |
public static final int BYTE_DEFAULT_PRECISION = BYTE_MAX_PRECISION; |
32 | 49 |
|
... | ... | |
55 | 72 |
public static final int DECIMAL_DEFAULT_PRECISION = 20; |
56 | 73 |
public static final int DECIMAL_DEFAULT_SCALE = 3; |
57 | 74 |
|
75 |
public static final int LOCALE_DEFAULT_SIZE = CoerceToLocale.LOCALE_DEFAULT_SIZE; |
|
58 | 76 |
|
59 | 77 |
public interface NumberPrecisionAndScale { |
60 | 78 |
public int getPrecision(); |
... | ... | |
106 | 124 |
|
107 | 125 |
public boolean isPredefinedPrecision(); |
108 | 126 |
|
127 |
public boolean isFloatingPoint(); |
|
128 |
|
|
109 | 129 |
public NumberPrecisionAndScale fixPrecisionAndScale(int precision, int scale); |
130 |
|
|
131 |
public int getFlags(); |
|
110 | 132 |
} |
Also available in: Unified diff