public class CPU
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents the amount of CPU that an app is using on a physical device.
Note that this does not represent system-wide CPU usage.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
architecture
The CPU's architecture, for example x86 or ARM.
|
private java.lang.Double |
clock
The clock speed of the device's CPU, expressed in hertz (Hz).
|
private java.lang.String |
frequency
The CPU's frequency.
|
Constructor and Description |
---|
CPU() |
Modifier and Type | Method and Description |
---|---|
CPU |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getArchitecture()
The CPU's architecture, for example x86 or ARM.
|
java.lang.Double |
getClock()
The clock speed of the device's CPU, expressed in hertz (Hz).
|
java.lang.String |
getFrequency()
The CPU's frequency.
|
int |
hashCode() |
void |
setArchitecture(java.lang.String architecture)
The CPU's architecture, for example x86 or ARM.
|
void |
setClock(java.lang.Double clock)
The clock speed of the device's CPU, expressed in hertz (Hz).
|
void |
setFrequency(java.lang.String frequency)
The CPU's frequency.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CPU |
withArchitecture(java.lang.String architecture)
The CPU's architecture, for example x86 or ARM.
|
CPU |
withClock(java.lang.Double clock)
The clock speed of the device's CPU, expressed in hertz (Hz).
|
CPU |
withFrequency(java.lang.String frequency)
The CPU's frequency.
|
private java.lang.String frequency
The CPU's frequency.
private java.lang.String architecture
The CPU's architecture, for example x86 or ARM.
private java.lang.Double 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 setFrequency(java.lang.String frequency)
The CPU's frequency.
frequency
- The CPU's frequency.public java.lang.String getFrequency()
The CPU's frequency.
public CPU withFrequency(java.lang.String frequency)
The CPU's frequency.
frequency
- The CPU's frequency.public void setArchitecture(java.lang.String architecture)
The CPU's architecture, for example x86 or ARM.
architecture
- The CPU's architecture, for example x86 or ARM.public java.lang.String getArchitecture()
The CPU's architecture, for example x86 or ARM.
public CPU withArchitecture(java.lang.String architecture)
The CPU's architecture, for example x86 or ARM.
architecture
- The CPU's architecture, for example x86 or ARM.public void setClock(java.lang.Double clock)
The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.
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 java.lang.Double getClock()
The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.
public CPU withClock(java.lang.Double clock)
The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.
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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CPU clone()
clone
in class java.lang.Object