source: DCWoRMS/trunk/src/schedframe/Parameter.java @ 477

Revision 477, 758 bytes checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import schemas.StringValueWithUnit;
7
8public class Parameter extends ArrayList<StringValueWithUnit> {
9
10        /**
11         *
12         */
13        private static final long serialVersionUID = 1L;
14        protected String name;
15        protected List<Property> properties;
16
17        public Parameter(String name) {
18                this.name = name;
19        }
20
21        public List<Property> getProperties() {
22                return properties;
23        }
24
25        public boolean addProperty(Property prop){
26                if(properties == null){
27                        properties = new ArrayList<Property>();
28                }
29                return properties.add(prop);
30        }
31       
32        public Property getProperty(String propName){
33                for(Property property: properties){
34                        if(property.getName().equals(propName)){
35                                return property;
36                        }
37                }
38                return null;
39        }
40}
Note: See TracBrowser for help on using the repository browser.