All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.devicefarm.model.CPU Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not
 * use this file except in compliance with the License. A copy of the License is
 * located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.devicefarm.model;

import java.io.Serializable;

/**
 * 

* Represents the amount of CPU that an app is using on a physical device. *

*

* Note that this does not represent system-wide CPU usage. *

*/ public class CPU implements Serializable, Cloneable { /** *

* The CPU's frequency. *

*/ private String frequency; /** *

* The CPU's architecture, for example x86 or ARM. *

*/ private String architecture; /** *

* The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. *

*/ private Double clock; /** *

* The CPU's frequency. *

* * @param frequency * The CPU's frequency. */ public void setFrequency(String frequency) { this.frequency = frequency; } /** *

* The CPU's frequency. *

* * @return The CPU's frequency. */ public String getFrequency() { return this.frequency; } /** *

* The CPU's frequency. *

* * @param frequency * The CPU's frequency. * @return Returns a reference to this object so that method calls can be * chained together. */ public CPU withFrequency(String frequency) { setFrequency(frequency); return this; } /** *

* The CPU's architecture, for example x86 or ARM. *

* * @param architecture * The CPU's architecture, for example x86 or ARM. */ public void setArchitecture(String architecture) { this.architecture = architecture; } /** *

* The CPU's architecture, for example x86 or ARM. *

* * @return The CPU's architecture, for example x86 or ARM. */ public String getArchitecture() { return this.architecture; } /** *

* The CPU's architecture, for example x86 or ARM. *

* * @param architecture * The CPU's architecture, for example x86 or ARM. * @return Returns a reference to this object so that method calls can be * chained together. */ public CPU withArchitecture(String architecture) { setArchitecture(architecture); return this; } /** *

* The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. *

* * @param clock * The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. */ public void setClock(Double clock) { this.clock = clock; } /** *

* The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. *

* * @return The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. */ public Double getClock() { return this.clock; } /** *

* The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. *

* * @param clock * The clock speed of the device's CPU, expressed in hertz (Hz). For * example, a 1.2 GHz CPU is expressed as 1200000000. * @return Returns a reference to this object so that method calls can be * chained together. */ public CPU withClock(Double clock) { setClock(clock); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFrequency() != null) sb.append("Frequency: " + getFrequency() + ","); if (getArchitecture() != null) sb.append("Architecture: " + getArchitecture() + ","); if (getClock() != null) sb.append("Clock: " + getClock()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CPU == false) return false; CPU other = (CPU) obj; if (other.getFrequency() == null ^ this.getFrequency() == null) return false; if (other.getFrequency() != null && other.getFrequency().equals(this.getFrequency()) == false) return false; if (other.getArchitecture() == null ^ this.getArchitecture() == null) return false; if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false) return false; if (other.getClock() == null ^ this.getClock() == null) return false; if (other.getClock() != null && other.getClock().equals(this.getClock()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFrequency() == null) ? 0 : getFrequency().hashCode()); hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture() .hashCode()); hashCode = prime * hashCode + ((getClock() == null) ? 0 : getClock().hashCode()); return hashCode; } @Override public CPU clone() { try { return (CPU) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy