Revision 477,
758 bytes
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[477] | 1 | package schedframe; |
---|
| 2 | |
---|
| 3 | import java.util.ArrayList; |
---|
| 4 | import java.util.List; |
---|
| 5 | |
---|
| 6 | import schemas.StringValueWithUnit; |
---|
| 7 | |
---|
| 8 | public 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.