Debian Codegraph @

test/harness/jpype/boxed/Boxed.java

raw symbols SCIP
1 /* ****************************************************************************
2 Licensed under the Apache License, Version 2.0 (the "License");
3 you may not use this file except in compliance with the License.
4 You may obtain a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS,
10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 See the License for the specific language governing permissions and
12 limitations under the License.
13
14 See NOTICE file for details.
15 **************************************************************************** */
16 package jpype.boxed;
17
18 public class Boxed
19 {
20
21 // Call each type
22 static public boolean callBoolean(boolean i)
23 {
24 return i;
25 }
26
27 static public byte callByte(byte i)
28 {
29 return i;
30 }
31
32 static public char callChar(char i)
33 {
34 return i;
35 }
36
37 static public short callShort(short i)
38 {
39 return i;
40 }
41
42 static public int callInteger(int i)
43 {
44 return i;
45 }
46
47 static public long callLong(long i)
48 {
49 return i;
50 }
51
52 static public float callFloat(float i)
53 {
54 return i;
55 }
56
57 static public double callDouble(double i)
58 {
59 return i;
60 }
61
62 // Create a boxed type
63 static public Short newShort(short i)
64 {
65 return i;
66 }
67
68 static public Integer newInteger(int i)
69 {
70 return i;
71 }
72
73 static public Long newLong(long i)
74 {
75 return i;
76 }
77
78 static public Float newFloat(float i)
79 {
80 return i;
81 }
82
83 static public Double newDouble(double i)
84 {
85 return i;
86 }
87
88 // Check which is called
89 static public int whichShort(short i)
90 {
91 return 1;
92 }
93
94 static public int whichShort(Short i)
95 {
96 return 2;
97 }
98
99 static public int whichInteger(int i)
100 {
101 return 1;
102 }
103
104 static public int whichInteger(Integer i)
105 {
106 return 2;
107 }
108
109 static public int whichLong(long i)
110 {
111 return 1;
112 }
113
114 static public int whichLong(Long i)
115 {
116 return 2;
117 }
118
119 static public int whichFloat(float i)
120 {
121 return 1;
122 }
123
124 static public int whichFloat(Float i)
125 {
126 return 2;
127 }
128
129 static public int whichDouble(double i)
130 {
131 return 1;
132 }
133
134 static public int whichDouble(Double i)
135 {
136 return 2;
137 }
138 }