package com.rongwei.cloudbalancing.domain; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @EqualsAndHashCode(callSuper = true) @Data @NoArgsConstructor public class CloudComputer extends AbstractPersistable { private int cpuPower; private int memory; private int networkBandwidth; private int cost; public CloudComputer(long id, int cpuPower, int memory, int networkBandwidth, int cost) { super(id); this.cpuPower = cpuPower; this.memory = memory; this.networkBandwidth = networkBandwidth; this.cost = cost; } public int getMultiplicand() { return this.cpuPower * this.memory * this.networkBandwidth; } public String getLabel() { return "Computer " + id; } }