File: MyClass5b.java

package info (click to toggle)
libjibx1.2-java 1.2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,260 kB
  • sloc: java: 75,013; xml: 14,068; makefile: 17
file content (33 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

package simple;

class MyClass5b extends MyClass5a
{
	/*package*/ boolean factory;
	private boolean preset;
	private boolean postset;
	private int value;
	
	private void preset() {
		preset = true;
		value = 1;
	}
	
	private void postset() {
		postset = true;
		if (value == 2) {
			value = 3;
		}
	}
	
	private void preget() {
		value = 2;
	}
	
	protected void verify() {
		if (!factory || !preset || !postset) {
			throw new IllegalStateException
				("factory, pre-set, or post-set method not called");
		}
	}
}