public static Builder fromDatacenter(Datacenter in) { return Datacenter.builder() .id(in.getId()) .name(in.getName()) .longName(in.getLongName()) .locationAddress(in.getLocationAddress()); }
public String belongsTo(String serverName) { for (Datacenter datacenter : hypervisors) { if (datacenter.getServers().contains(serverName)) { return datacenter.getName(); } } return null; }
@Override public int compareTo(Datacenter arg0) { return new Long(id).compareTo(arg0.getId()); }