blob: b3142908829d7bf84e899446035c3d0581794a55 [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17public class Blort
18{
19
20 public int phiTest() {
21 int i = 1;
22 int j = 1;
23 int k = 0;
24
25 while (k < 100) {
26 if (j < 20) {
27 j = i;
28 k++;
29 } else {
30 j = k;
31 k += 2;
32 }
33 }
34
35 return j;
36 }
37
38 /**
39 * This method uses no registers.
40 */
41 public static void noVars() {
42 }
43
44 /**
45 * This method requires an ordered successor list with
46 * multiple identically-valued entries.
47 */
48 Object fd;
49 public Object getOption(int optID) throws RuntimeException
50 {
51 if (fd == null) {
52 throw new RuntimeException("socket not created");
53 }
54
55 int value = 0;
56 switch (optID)
57 {
58 case 1:
59 case 2:
60 return new Integer(value);
61 case 3:
62 default:
63 return Boolean.valueOf(value != 0);
64 }
65 }
66}
67