2 **********************************************************************
3 * Copyright (C) 1999, International Business Machines Corporation and others. All Rights Reserved.
4 **********************************************************************
5 * Date Name Description
6 * 11/17/99 aliu Creation.
7 **********************************************************************
10 //////////////////////////////////////////////////////////////
12 // NOTICE - Do not use
14 // This entire file has been marked obsolete as of ICU 2.4.
15 // This will be removed as of ICU 2.8. Use UnicodeSet methods instead.
17 //////////////////////////////////////////////////////////////
22 #include "unicode/utypes.h"
24 #if !UCONFIG_NO_TRANSLITERATION
26 #include "unicode/uobject.h"
33 * <code>UnicodeFilterLogic</code> provides logical operators on
34 * {@link UnicodeFilter} objects. This class cannot be instantiated;
35 * it consists only of static methods. The static methods return
36 * filter objects that perform logical inversion (<tt>not</tt>),
37 * intersection (<tt>and</tt>), or union (<tt>or</tt>) of the given
40 * If a UnicodeFilter* f is passed in, where f == NULL, then that
41 * is treated as a filter that contains all Unicode characters.
42 * Therefore, createNot(NULL) returns a filter that contains no
43 * Unicode characters. Likewise, createAnd(g, NULL) returns g->clone(),
44 * and createAnd(NULL, NULL) returns NULL.
46 * @obsolete ICU 2.8. Use UnicodeSet methods instead since this class will be removed in that release.
48 class U_I18N_API UnicodeFilterLogic
/* not : public UObject because all methods are static */ {
53 * Returns a <tt>UnicodeFilter</tt> that implements the inverse of
55 * @param f may be NULL
56 * @result always non-NULL
57 * @obsolete ICU 2.8. Use UnicodeSet methods instead since this class will be removed in that release.
59 static UnicodeFilter
* createNot(const UnicodeFilter
* f
);
62 * Returns a <tt>UnicodeFilter</tt> that implements a short
63 * circuit AND of the result of the two given filters. That is,
64 * if <tt>f.contains()</tt> is <tt>false</tt>, then <tt>g.contains()</tt>
65 * is not called, and <tt>contains()</tt> returns <tt>false</tt>.
66 * @param f may be NULL
67 * @param g may be NULL
68 * @result will be NULL if and only if f == g == NULL
69 * @obsolete ICU 2.8. Use UnicodeSet methods instead since this class will be removed in that release.
71 static UnicodeFilter
* createAnd(const UnicodeFilter
* f
,
72 const UnicodeFilter
* g
);
75 * Returns a <tt>UnicodeFilter</tt> that implements a short
76 * circuit AND of the result of the two given filters. That is,
77 * if <tt>f.contains()</tt> is <tt>false</tt>, then <tt>g.contains()</tt>
78 * is not called, and <tt>contains()</tt> returns <tt>false</tt>.
79 * @param adoptedF may be NULL; this argument is adopted
80 * @param adoptedG may be NULL; this argument is adopted
81 * @result will be NULL if and only if f == g == NULL
82 * @obsolete ICU 2.8. Use UnicodeSet methods instead since this class will be removed in that release.
84 static UnicodeFilter
* createAdoptingAnd(UnicodeFilter
* adoptedF
,
85 UnicodeFilter
* adoptedG
);
88 * Returns a <tt>UnicodeFilter</tt> that implements a short
89 * circuit OR of the result of the two given filters. That is, if
90 * <tt>f.contains()</tt> is <tt>true</tt>, then <tt>g.contains()</tt> is
91 * not called, and <tt>contains()</tt> returns <tt>true</tt>.
92 * @param f may be NULL
93 * @param g may be NULL
94 * @result will be NULL if and only if f == g == NULL
95 * @obsolete ICU 2.8. Use UnicodeSet methods instead since this class will be removed in that release.
97 static UnicodeFilter
* createOr(const UnicodeFilter
* f
,
98 const UnicodeFilter
* g
);
101 // Disallow instantiation
102 UnicodeFilterLogic();
105 inline UnicodeFilterLogic::UnicodeFilterLogic() {}
109 #endif /* #if !UCONFIG_NO_TRANSLITERATION */