Package org.apache.commons.lang3.arch
Class Processor
- java.lang.Object
-
- org.apache.commons.lang3.arch.Processor
-
public class Processor extends java.lang.ObjectTheProcessorrepresents a microprocessor and defines some properties like architecture and type of the microprocessor.- Since:
- 3.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProcessor.ArchTheProcessor.Archenum defines the architecture of a microprocessor.static classProcessor.TypeTheProcessor.Typeenum defines types of a microprocessor.
-
Constructor Summary
Constructors Constructor Description Processor(Processor.Arch arch, Processor.Type type)Constructs aProcessorobject with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Processor.ArchgetArch()Gets the processor architecture as anProcessor.Archenum.Processor.TypegetType()Gets the processor type asProcessor.Typeenum.booleanis32Bit()Tests ifProcessoris 32 bit.booleanis64Bit()Tests ifProcessoris 64 bit.booleanisAarch64()Tests ifProcessoris type of Aarch64.booleanisIA64()Tests ifProcessoris type of Intel Itanium.booleanisPPC()Tests ifProcessoris type of Power PC.booleanisRISCV()Tests ifProcessoris type of RISC-V.booleanisX86()Tests ifProcessoris type of x86.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Processor
public Processor(Processor.Arch arch, Processor.Type type)
Constructs aProcessorobject with the given parameters.- Parameters:
arch- The processor architecture.type- The processor type.
-
-
Method Detail
-
getArch
public Processor.Arch getArch()
Gets the processor architecture as anProcessor.Archenum. The processor architecture defines, if the processor has a 32 or 64 bit architecture.- Returns:
- A
Processor.Archenum.
-
getType
public Processor.Type getType()
Gets the processor type asProcessor.Typeenum. The processor type defines, if the processor is for example an x86 or PPA.- Returns:
- A
Processor.Typeenum.
-
is32Bit
public boolean is32Bit()
Tests ifProcessoris 32 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_32, elsefalse.
-
is64Bit
public boolean is64Bit()
Tests ifProcessoris 64 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_64, elsefalse.
-
isAarch64
public boolean isAarch64()
Tests ifProcessoris type of Aarch64.- Returns:
true, ifProcessorisProcessor.Type.AARCH_64, elsefalse.- Since:
- 3.13.0
-
isIA64
public boolean isIA64()
Tests ifProcessoris type of Intel Itanium.- Returns:
true. ifProcessorisProcessor.Type.IA_64, elsefalse.
-
isPPC
public boolean isPPC()
Tests ifProcessoris type of Power PC.- Returns:
true. ifProcessorisProcessor.Type.PPC, elsefalse.
-
isRISCV
public boolean isRISCV()
Tests ifProcessoris type of RISC-V.- Returns:
true. ifProcessorisProcessor.Type.RISC_V, elsefalse.- Since:
- 3.14.0
-
isX86
public boolean isX86()
Tests ifProcessoris type of x86.- Returns:
true, ifProcessorisProcessor.Type.X86, elsefalse.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-