mirror of https://github.com/apache/jclouds.git
Issue 695: Removed setter and put annotation on field
This commit is contained in:
parent
7feefaff9e
commit
a1c0041650
|
@ -168,8 +168,7 @@ public class HardwareConfiguration extends BaseResource<HardwareConfiguration> {
|
||||||
public HardwareConfiguration(Set<Action> actions, int processorCount, @Nullable Memory memory, Set<VirtualDisk> virtualDisks, Set<VirtualNic> virtualNics) {
|
public HardwareConfiguration(Set<Action> actions, int processorCount, @Nullable Memory memory, Set<VirtualDisk> virtualDisks, Set<VirtualNic> virtualNics) {
|
||||||
this.actions = Actions.builder().actions(checkNotNull(actions, "actions")).build();
|
this.actions = Actions.builder().actions(checkNotNull(actions, "actions")).build();
|
||||||
this.virtualDisks = Disks.builder().disks(checkNotNull(virtualDisks,"virtualDisks")).build();
|
this.virtualDisks = Disks.builder().disks(checkNotNull(virtualDisks,"virtualDisks")).build();
|
||||||
for( VirtualNic virtualNic: checkNotNull(virtualNics, "virtualNics")) this.virtualNics.setVirtualNic(virtualNic);
|
this.virtualNics = Nics.builder().nics(checkNotNull(virtualNics, "virtualNics")).build();
|
||||||
|
|
||||||
this.processorCount = processorCount;
|
this.processorCount = processorCount;
|
||||||
this.memory = memory;
|
this.memory = memory;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,12 +78,8 @@ public class Nics {
|
||||||
this.nics = Sets.newLinkedHashSet(nics);
|
this.nics = Sets.newLinkedHashSet(nics);
|
||||||
}
|
}
|
||||||
|
|
||||||
private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet();
|
|
||||||
|
|
||||||
@XmlElement(name = "Nic")
|
@XmlElement(name = "Nic")
|
||||||
public void setVirtualNic(VirtualNic nic) {
|
private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet();
|
||||||
this.nics.add(nic);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Set<VirtualNic> getVirtualNics() {
|
public Set<VirtualNic> getVirtualNics() {
|
||||||
return Collections.unmodifiableSet(nics);
|
return Collections.unmodifiableSet(nics);
|
||||||
|
|
Loading…
Reference in New Issue