01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: **/package org.araneaframework.uilib.list.util.like;
16:
17: /**
18: * Wildcard Like pattern handler.
19: *
20: * @author <a href="mailto:rein@araneaframework.org">Rein Raudjärv</a>
21: */
22: public interface WildcardHandler {
23:
24: int ANY_STRING_WILDCARD = 1;
25: int ANY_CHAR_WILDCARD = 2;
26: int NO_WILDCARD = 0;
27:
28: /**
29: * Must be set as which wildcard the Like pattern starts with.
30: *
31: * @param wildcard Like pattern wildcard.
32: */
33: void setStartsWith(int wildcard);
34:
35: /**
36: * Must be set as which wildcard the Like pattern ends with
37: *
38: * @param wildcard Like pattern wildcard.
39: */
40: void setEndsWith(int wildcard);
41:
42: /**
43: * Returns which wildcard the Like pattern currently starts with.
44: *
45: * @return Like pattern wildcard.
46: */
47: int getStartsWith();
48:
49: /**
50: * Returns which wildcard the Like pattern currently ends with.
51: *
52: * @return Like pattern wildcard.
53: */
54: int getEndsWith();
55:
56: /**
57: * Returns which wildcard the Like pattern should start with.
58: *
59: * @return Like pattern wildcard.
60: */
61: int shouldStartWith();
62:
63: /**
64: * Returns which wildcard the Like pattern should end with.
65: *
66: * @return Like pattern wildcard.
67: */
68: int shouldEndWith();
69:
70: /**
71: * Returns new instance of the same class.
72: *
73: * @return new instance of the same class.
74: */
75: WildcardHandler newInstance();
76:
77: }
|