01: /*
02: * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
03: *
04: * The program is provided "as is" without any warranty express or
05: * implied, including the warranty of non-infringement and the implied
06: * warranties of merchantibility and fitness for a particular purpose.
07: * IBM will not be liable for any damages suffered by you as a result
08: * of using the Program. In no event will IBM be liable for any
09: * special, indirect or consequential damages or lost profits even if
10: * IBM has been advised of the possibility of their occurrence. IBM
11: * will not be liable for any third party claims against you.
12: */
13: package com.ibm.richtext.styledtext;
14:
15: /**
16: * Iterators use this class to keep from getting out of sync with
17: * their underlying data. When created, the iterator gets a
18: * Validation instance. If the underlying data changes, the Validation
19: * becomes invalid. Usually iterators will throw exceptions if accessed
20: * after becoming invalid.
21: */
22: final class Validation {
23:
24: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
25: private boolean fIsValid = true;
26:
27: boolean isValid() {
28:
29: return fIsValid;
30: }
31:
32: void invalidate() {
33:
34: fIsValid = false;
35: }
36: }
|