Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IPropertyHolder |
|
| 1.0;1 |
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.util; | |
16 | ||
17 | import java.util.List; | |
18 | ||
19 | /** | |
20 | * An interface that defines an object that can store named propertys. The names | |
21 | * and the properties are Strings. | |
22 | * | |
23 | * @author Howard Lewis Ship | |
24 | */ | |
25 | ||
26 | public interface IPropertyHolder | |
27 | { | |
28 | ||
29 | /** | |
30 | * Returns a List of Strings, the names of all properties held by the | |
31 | * receiver. May return an empty list. The List is sorted alphabetically. | |
32 | * The List may be modified without affecting this property holder. | |
33 | * <p> | |
34 | * Prior to release 2.2, this method returned Collection. | |
35 | */ | |
36 | ||
37 | List getPropertyNames(); | |
38 | ||
39 | /** | |
40 | * Sets a named property. The new value replaces the existing value, if any. | |
41 | * Setting a property to null is the same as removing the property. | |
42 | */ | |
43 | ||
44 | void setProperty(String name, String value); | |
45 | ||
46 | /** | |
47 | * Removes the named property, if present. | |
48 | */ | |
49 | ||
50 | void removeProperty(String name); | |
51 | ||
52 | /** | |
53 | * Retrieves the named property, or null if the property is not defined. | |
54 | */ | |
55 | ||
56 | String getProperty(String name); | |
57 | } |