Begin versioning.
[fits.git] / src / nom / tam / util / PrimitiveInfo.java
1 package nom.tam.util;\r
2 \r
3 /** This interface collects some information about Java primitives.\r
4  */\r
5 public interface PrimitiveInfo {\r
6 \r
7     /** Suffixes used for the classnames for primitive arrays. */\r
8     char[] suffixes = new char[]{'B', 'S', 'C', 'I', 'J', 'F', 'D', 'Z'};\r
9     /** Classes of the primitives. These should be in windening order\r
10      * (char is as always a problem).\r
11      */\r
12     Class[] classes = new Class[]{\r
13         byte.class, short.class, char.class, int.class,\r
14         long.class, float.class, double.class, boolean.class};\r
15     /** Is this a numeric class */\r
16     boolean[] isNumeric = new boolean[]{true, true, true, true, true, true, true, false};\r
17     /** Full names */\r
18     String[] types = new String[]{\r
19         "byte", "short", "char", "int",\r
20         "long", "float", "double", "boolean"\r
21     };\r
22     /** Sizes */\r
23     int[] sizes = new int[]{1, 2, 2, 4, 8, 4, 8, 1};\r
24     /** Index of first element of above arrays referring to a numeric type */\r
25     int FIRST_NUMERIC = 0;\r
26     /** Index of last element of above arrays referring to a numeric type */\r
27     int LAST_NUMERIC = 6;\r
28     int BYTE_INDEX = 0;\r
29     int SHORT_INDEX = 1;\r
30     int CHAR_INDEX = 2;\r
31     int INT_INDEX = 3;\r
32     int LONG_INDEX = 4;\r
33     int FLOAT_INDEX = 5;\r
34     int DOUBLE_INDEX = 6;\r
35     int BOOLEAN_INDEX = 7;\r
36 }\r
37 \r
38 \r