Revision 477,
671 bytes
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Line | |
---|
1 | package schedframe.resources.computing.validator; |
---|
2 | |
---|
3 | import java.util.Properties; |
---|
4 | |
---|
5 | import schedframe.resources.computing.ComputingResource; |
---|
6 | |
---|
7 | public class ResourcePropertiesValidator implements ResourceValidator{ |
---|
8 | |
---|
9 | private Properties properties; |
---|
10 | public ResourcePropertiesValidator(Properties properties) { |
---|
11 | super(); |
---|
12 | this.properties = properties; |
---|
13 | } |
---|
14 | |
---|
15 | @Override |
---|
16 | public boolean validate(ComputingResource resource) { |
---|
17 | Properties resProperties = resource.getProperties(); |
---|
18 | for(Object key: properties.keySet()){ |
---|
19 | String property = (String) key; |
---|
20 | if(resProperties.getProperty(property) != properties.getProperty(property)) |
---|
21 | return false; |
---|
22 | } |
---|
23 | return true; |
---|
24 | } |
---|
25 | |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.