Package org.apache.commons.lang3.arch
Class Processor
java.lang.Object
org.apache.commons.lang3.arch.Processor
The
Processor
represents a microprocessor and defines
some properties like architecture and type of the microprocessor.- Since:
- 3.6
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
TheProcessor.Arch
enum defines the architecture of a microprocessor.static enum
TheProcessor.Type
enum defines types of a microprocessor. -
Constructor Summary
ConstructorDescriptionProcessor
(Processor.Arch arch, Processor.Type type) Constructs aProcessor
object with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetArch()
Gets the processor architecture as anProcessor.Arch
enum.getType()
Gets the processor type asProcessor.Type
enum.boolean
is32Bit()
Tests ifProcessor
is 32 bit.boolean
is64Bit()
Tests ifProcessor
is 64 bit.boolean
Tests ifProcessor
is type of Aarch64.boolean
isIA64()
Tests ifProcessor
is type of Intel Itanium.boolean
isPPC()
Tests ifProcessor
is type of Power PC.boolean
isRISCV()
Tests ifProcessor
is type of RISC-V.boolean
isX86()
Tests ifProcessor
is type of x86.toString()
-
Constructor Details
-
Processor
Constructs aProcessor
object with the given parameters.- Parameters:
arch
- The processor architecture.type
- The processor type.
-
-
Method Details
-
getArch
Gets the processor architecture as anProcessor.Arch
enum. The processor architecture defines, if the processor has a 32 or 64 bit architecture.- Returns:
- A
Processor.Arch
enum.
-
getType
Gets the processor type asProcessor.Type
enum. The processor type defines, if the processor is for example an x86 or PPA.- Returns:
- A
Processor.Type
enum.
-
is32Bit
Tests ifProcessor
is 32 bit.- Returns:
true
, ifProcessor
isProcessor.Arch.BIT_32
, elsefalse
.
-
is64Bit
Tests ifProcessor
is 64 bit.- Returns:
true
, ifProcessor
isProcessor.Arch.BIT_64
, elsefalse
.
-
isAarch64
Tests ifProcessor
is type of Aarch64.- Returns:
true
, ifProcessor
isProcessor.Type.AARCH_64
, elsefalse
.- Since:
- 3.13.0
-
isIA64
Tests ifProcessor
is type of Intel Itanium.- Returns:
true
. ifProcessor
isProcessor.Type.IA_64
, elsefalse
.
-
isPPC
Tests ifProcessor
is type of Power PC.- Returns:
true
. ifProcessor
isProcessor.Type.PPC
, elsefalse
.
-
isRISCV
Tests ifProcessor
is type of RISC-V.- Returns:
true
. ifProcessor
isProcessor.Type.RISC_V
, elsefalse
.- Since:
- 3.14.0
-
isX86
Tests ifProcessor
is type of x86.- Returns:
true
, ifProcessor
isProcessor.Type.X86
, elsefalse
.
-
toString
-