mirror of https://github.com/apache/jclouds.git
Issue 695: Converted setAction to addAction and moved annotation to field
This commit is contained in:
parent
7a74c3cf27
commit
9852a579e9
|
@ -34,10 +34,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
*/
|
||||
public class Actions {
|
||||
|
||||
@XmlElement(name = "Action")
|
||||
private LinkedHashSet<Action> actions = Sets.newLinkedHashSet();
|
||||
|
||||
@XmlElement(name = "Action")
|
||||
void setAction(Action action) {
|
||||
void addAction(Action action) {
|
||||
checkNotNull(action,"action");
|
||||
this.actions.add(action);
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ public class HardwareConfiguration extends BaseResource<HardwareConfiguration> {
|
|||
private Nics virtualNics = new Nics();
|
||||
|
||||
public HardwareConfiguration(Set<Action> actions, int processorCount, @Nullable Memory memory, Set<VirtualDisk> virtualDisks, Set<VirtualNic> virtualNics) {
|
||||
for( Action action: checkNotNull(actions, "actions")) this.actions.setAction(action);
|
||||
for( Action action: checkNotNull(actions, "actions")) this.actions.addAction(action);
|
||||
for( VirtualDisk disk: checkNotNull(virtualDisks, "virtualDisks")) this.virtualDisks.setVirtualDisk(disk);
|
||||
for( VirtualNic virtualNic: checkNotNull(virtualNics, "virtualNics")) this.virtualNics.setVirtualNic(virtualNic);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public class VirtualMachine extends BaseNamedResource<VirtualMachine> {
|
|||
*/
|
||||
public Builder actions(Set<Action> actions) {
|
||||
checkNotNull(actions,"actions");
|
||||
for(Action action:actions) this.actions.setAction(action);
|
||||
for(Action action:actions) this.actions.addAction(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue