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;
16:
17: import java.io.Serializable;
18:
19: /**
20: * Implements <code>Iterator</code> pattern, providing one-time access to the
21: * specific steps that form a path in a hierarchical structure.
22: * <br><br>
23: * Path can be used to show the path to a specific component in a composite
24: * (hierarchy of components) and then events can be routed exactly to certain
25: * components.
26: * <br><br>
27: * Path is also used in {@link org.araneaframework.InputData} to specify which data is meant for
28: * which component.
29: *
30: * @author "Toomas Römer" <toomas@webmedia.ee>
31: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
32: */
33: public interface Path extends Cloneable, Serializable {
34:
35: /**
36: * Returns next step in the path without changing the current position.
37: * @return the next step in the path
38: */
39: public Object getNext();
40:
41: /**
42: * Returns the next step in path.
43: * @return the next step in the path
44: */
45: public Object next();
46:
47: /**
48: * Returns true if this path has more elements.
49: * @return true if path has more elements
50: */
51: public boolean hasNext();
52: }
|