Package org.apache.commons.lang3.arch
Class Processor
- java.lang.Object
-
- org.apache.commons.lang3.arch.Processor
-
public class Processor extends java.lang.Object
TheProcessor
represents 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 class
Processor.Arch
TheProcessor.Arch
enum defines the architecture of a microprocessor.static class
Processor.Type
TheProcessor.Type
enum defines types of a microprocessor.
-
Constructor Summary
Constructors Constructor Description Processor(Processor.Arch arch, Processor.Type type)
Constructs aProcessor
object with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Processor.Arch
getArch()
Returns the processor architecture as anProcessor.Arch
enum.Processor.Type
getType()
Returns the processor type asProcessor.Type
enum.boolean
is32Bit()
Checks ifProcessor
is 32 bit.boolean
is64Bit()
Checks ifProcessor
is 64 bit.boolean
isIA64()
Checks ifProcessor
is type of Intel Itanium.boolean
isPPC()
Checks ifProcessor
is type of Power PC.boolean
isX86()
Checks ifProcessor
is type of x86.
-
-
-
Constructor Detail
-
Processor
public Processor(Processor.Arch arch, Processor.Type type)
Constructs aProcessor
object with the given parameters.- Parameters:
arch
- The processor architecture.type
- The processor type.
-
-
Method Detail
-
getArch
public Processor.Arch getArch()
Returns 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
public Processor.Type getType()
Returns the processor type asProcessor.Type
enum. The processor type defines, if the processor is for example a x86 or PPA.- Returns:
- A
Processor.Type
enum.
-
is32Bit
public boolean is32Bit()
Checks ifProcessor
is 32 bit.- Returns:
true
, ifProcessor
isProcessor.Arch.BIT_32
, elsefalse
.
-
is64Bit
public boolean is64Bit()
Checks ifProcessor
is 64 bit.- Returns:
true
, ifProcessor
isProcessor.Arch.BIT_64
, elsefalse
.
-
isX86
public boolean isX86()
Checks ifProcessor
is type of x86.- Returns:
true
, ifProcessor
isProcessor.Type.X86
, elsefalse
.
-
isIA64
public boolean isIA64()
Checks ifProcessor
is type of Intel Itanium.- Returns:
true
. ifProcessor
isProcessor.Type.IA_64
, elsefalse
.
-
isPPC
public boolean isPPC()
Checks ifProcessor
is type of Power PC.- Returns:
true
. ifProcessor
isProcessor.Type.PPC
, elsefalse
.
-
-