コード例 #1
0
 public T fromServiceOffering(ServiceOffering in) {
   return this.id(in.getId())
       .name(in.getName())
       .displayText(in.getDisplayText())
       .created(in.getCreated())
       .domain(in.getDomain())
       .domainId(in.getDomainId())
       .cpuNumber(in.getCpuNumber())
       .cpuSpeed(in.getCpuSpeed())
       .memory(in.getMemory())
       .supportsHA(in.supportsHA())
       .storageType(in.getStorageType())
       .tags(in.getTags())
       .defaultUse(in.isDefaultUse())
       .systemOffering(in.isSystemOffering())
       .cpuUseLimited(in.isCpuUseLimited())
       .networkRate(in.getNetworkRate())
       .systemVmType(in.isSystemVmType());
 }
コード例 #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null || getClass() != obj.getClass()) return false;
   ServiceOffering that = ServiceOffering.class.cast(obj);
   return Objects.equal(this.id, that.id)
       && Objects.equal(this.name, that.name)
       && Objects.equal(this.displayText, that.displayText)
       && Objects.equal(this.created, that.created)
       && Objects.equal(this.domain, that.domain)
       && Objects.equal(this.domainId, that.domainId)
       && Objects.equal(this.cpuNumber, that.cpuNumber)
       && Objects.equal(this.cpuSpeed, that.cpuSpeed)
       && Objects.equal(this.memory, that.memory)
       && Objects.equal(this.haSupport, that.haSupport)
       && Objects.equal(this.storageType, that.storageType)
       && Objects.equal(this.getTags(), that.getTags())
       && Objects.equal(this.defaultUse, that.defaultUse)
       && Objects.equal(this.systemOffering, that.systemOffering)
       && Objects.equal(this.cpuUseLimited, that.cpuUseLimited)
       && Objects.equal(this.networkRate, that.networkRate)
       && Objects.equal(this.systemVmType, that.systemVmType);
 }