KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > contrib > tree > model > ITreeNode


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.contrib.tree.model;
16
17 import java.io.Serializable JavaDoc;
18 import java.util.Collection JavaDoc;
19
20 /**
21  * @author ceco
22  */

23
24 public interface ITreeNode extends Serializable JavaDoc
25 {
26     
27     /**
28      * Returns the <code>Collection</code> of children.
29      */

30     Collection JavaDoc getChildren();
31
32     /**
33      * Returns the number of children <code>ITreeNode</code>s the receiver
34      * contains.
35      */

36     int getChildCount();
37
38     /**
39      * Returns the parent <code>ITreeNode</code> of the receiver.
40      */

41     ITreeNode getParent();
42
43     /**
44      * Returns the true if current node contains received children, otherwise return false;
45      */

46     boolean containsChild(ITreeNode node);
47
48     /**
49      * Returns true if the receiver allows children.
50      */

51     boolean getAllowsChildren();
52
53     /**
54      * Returns true if the receiver is a leaf.
55      */

56     boolean isLeaf();
57
58 }
59
Popular Tags