Revision 477,
713 bytes
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Line | |
---|
1 | package schedframe.scheduling.manager.resources; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | |
---|
5 | import schedframe.resources.ResourceType; |
---|
6 | import schedframe.resources.StandardResourceType; |
---|
7 | import schedframe.resources.computing.ComputingResource; |
---|
8 | |
---|
9 | public class ManagedComputingResources extends ArrayList<ComputingResource>{ |
---|
10 | |
---|
11 | private static final long serialVersionUID = 1L; |
---|
12 | |
---|
13 | private ResourceType type; |
---|
14 | |
---|
15 | public boolean add(ComputingResource compRes){ |
---|
16 | if(type == null){ |
---|
17 | type = compRes.getType(); |
---|
18 | } |
---|
19 | if(type.getName().equals(compRes.getType().getName())) |
---|
20 | return super.add(compRes); |
---|
21 | return false; |
---|
22 | } |
---|
23 | |
---|
24 | public ResourceType getType() { |
---|
25 | if (type == null) |
---|
26 | return StandardResourceType.Undefined; |
---|
27 | return type; |
---|
28 | } |
---|
29 | |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.