vcloud-director 1.5: addressing review comments/nits

This commit is contained in:
Adam Lowe 2012-03-06 18:05:48 +00:00
parent 335e14f505
commit 03e622ba2a
5 changed files with 10 additions and 10 deletions

View File

@ -73,7 +73,7 @@ public class ResourceEntities {
* @see ResourceEntities#getResourceEntities()
*/
public Builder resourceEntities(Set<Reference> resourceEntities) {
this.resourceEntities = Sets.newLinkedHashSet(checkNotNull(resourceEntities, "resourceEntities"));
this.resourceEntities = ImmutableSet.copyOf(checkNotNull(resourceEntities, "resourceEntities"));
return this;
}

View File

@ -109,7 +109,7 @@ public class SourcedCompositionItemParam {
* @see SourcedCompositionItemParam#getNetworkAssignments()
*/
public Builder networkAssignments(Set<NetworkAssignment> networkAssignments) {
this.networkAssignments = checkNotNull(networkAssignments, "networkAssignments");
this.networkAssignments = ImmutableSet.copyOf(checkNotNull(networkAssignments, "networkAssignments"));
return this;
}

View File

@ -72,7 +72,7 @@ public class StaticRoute {
private String name;
private String network;
private String nextHopIp;
private String _interface;
private String theInterface;
/**
* @see StaticRoute#getName()
@ -101,20 +101,20 @@ public class StaticRoute {
/**
* @see StaticRoute#getInterface()
*/
public Builder _interface(String _interface) {
this._interface = _interface;
public Builder setInterface(String theInterface) {
this.theInterface = theInterface;
return this;
}
public StaticRoute build() {
return new StaticRoute(name, network, nextHopIp, _interface);
return new StaticRoute(name, network, nextHopIp, theInterface);
}
public Builder fromStaticRoute(StaticRoute in) {
return name(in.getName())
.network(in.getNetwork())
.nextHopIp(in.getNextHopIp())
._interface(in.getInterface());
.setInterface(in.getInterface());
}
}

View File

@ -71,13 +71,13 @@ public class StaticRoutingService extends NetworkServiceType<StaticRoutingServic
public static class Builder extends NetworkServiceType.Builder<StaticRoutingService> {
private List<StaticRoute> staticRoutes;
private List<StaticRoute> staticRoutes = ImmutableList.of();
/**
* @see StaticRoutingService#getStaticRoutes()
*/
public Builder staticRoutes(List<StaticRoute> staticRoutes) {
this.staticRoutes = checkNotNull(staticRoutes, "staticRoutes");
this.staticRoutes = ImmutableList.copyOf(checkNotNull(staticRoutes, "staticRoutes"));
return this;
}

View File

@ -53,7 +53,7 @@ public class TasksInProgress {
* @see TasksInProgress#getTasks()
*/
public Builder tasks(Set<Task> tasks) {
this.tasks = checkNotNull(tasks, "tasks");
this.tasks = ImmutableSet.copyOf(checkNotNull(tasks, "tasks"));
return this;
}