KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > rm > resources > metadata > properties > ranges > Range


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (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 http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.rm.resources.metadata.properties.ranges;
20
21
22 /**
23  * This interface is implemented by objects which represent the
24  * restrictions imposed on values of a <code>Property</code> object.
25  *
26  * @author Michael Bell
27  * @version $Revision: 1.1 $
28  *
29  */

30 public interface Range {
31
32     /**
33      * Returns a <code>String</code> representation of the non class type
34      * restrictions on this range.
35      */

36     public String JavaDoc getDetails();
37
38     /**
39      * Returns a class name restriction which will determine what type of
40      * objects may be included in this range.
41      */

42     public String JavaDoc getObject();
43
44     /**
45      * Returns <code>true</code> if the specified object is a member of this
46      * range, that is meets the restrictions defined by this range.
47      *
48      * @param obj the object to validate
49      * @return <code>true</code> if the specified object is a member of this
50      * range
51      */

52     boolean isValid(Object JavaDoc obj);
53
54     /**
55      * Sets the non class type restrictions from a <code>String</code>
56      * representation. The format of the <code>String</code> is dependent on the
57      * implementation.
58      *
59      * @param sDetails teh <code>String</code> representation of the non
60      * class type restrictions
61      */

62     void setDetails(String JavaDoc sDetails);
63     
64     /**
65      * Returns <code>true</code> if this range has been changed since population.
66      *
67      * @return <code>true</code> if this range has been changed since population
68      */

69     public boolean isChanged();
70     
71     /**
72      * Returns the <code>Class</code> for the property instance which can
73      * take values of this range.
74      *
75      * @return the <code>Class</code> for the property instance which can
76      * take values of this range.
77      * @throws ClassNotFoundException if the class loader can not find the
78      * property instance class
79      */

80     public Class JavaDoc getPropertyInstanceClass() throws ClassNotFoundException JavaDoc;
81
82     
83     /**
84      * Returns a cloned version of this range.
85      *
86      * @return a cloned version of this range
87      */

88     Object JavaDoc clone();
89
90 }
91
Popular Tags