Processor¶
- public class org.apache.commons.lang3.arch.Processor[source]¶
Represents a microprocessor and defines some properties like architecture and type.
- Since:
3.6
Constructors¶
Constructs a |
- public Processor(Processor.Arch arch, Processor.Type type)[source]¶
Constructs a
Processorobject with the given parameters.- Parameters:
arch – The processor architecture.
type – The processor type.
Methods¶
Gets the processor architecture as an |
||
Gets the processor type as |
||
|
Tests if |
|
|
Tests if |
|
|
Tests if |
|
|
Tests if |
|
|
Tests if |
|
|
Tests if |
|
|
Tests if |
|
- public Processor.Arch getArch()[source]¶
Gets the processor architecture as an
Processor.Archenum. The processor architecture defines, if the processor has a 32 or 64 bit architecture.- Returns:
A
Processor.Archenum.
- public Processor.Type getType()[source]¶
Gets the processor type as
Processor.Typeenum. The processor type defines, if the processor is for example an x86 or PPA.- Returns:
A
Processor.Typeenum.
- public boolean is32Bit()[source]¶
Tests if
Processoris 32 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_32, elsefalse.
- public boolean is64Bit()[source]¶
Tests if
Processoris 64 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_64, elsefalse.
- public boolean isAarch64()[source]¶
Tests if
Processoris type of Aarch64.- Returns:
true, ifProcessorisProcessor.Type.AARCH_64, elsefalse.- Since:
3.13.0
- public boolean isIA64()[source]¶
Tests if
Processoris type of Intel Itanium.- Returns:
true. ifProcessorisProcessor.Type.IA_64, elsefalse.
- public boolean isPPC()[source]¶
Tests if
Processoris type of Power PC.- Returns:
true. ifProcessorisProcessor.Type.PPC, elsefalse.
- public boolean isRISCV()[source]¶
Tests if
Processoris type of RISC-V.- Returns:
true. ifProcessorisProcessor.Type.RISC_V, elsefalse.- Since:
3.14.0
- public boolean isX86()[source]¶
Tests if
Processoris type of x86.- Returns:
true, ifProcessorisProcessor.Type.X86, elsefalse.