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
Nested ClassesModifier and TypeClassDescriptionstatic enumTheProcessor.Archenum defines the architecture of a microprocessor.static enumTheProcessor.Typeenum defines types of a microprocessor. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProcessor(Processor.Arch arch, Processor.Type type) Constructs aProcessorobject with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetArch()Returns the processor architecture as anProcessor.Archenum.getType()Returns the processor type asProcessor.Typeenum.booleanis32Bit()Checks ifProcessoris 32 bit.booleanis64Bit()Checks ifProcessoris 64 bit.booleanisIA64()Checks ifProcessoris type of Intel Itanium.booleanisPPC()Checks ifProcessoris type of Power PC.booleanisX86()Checks ifProcessoris type of x86.
-
Field Details
-
arch
-
type
-
-
Constructor Details
-
Processor
Constructs aProcessorobject with the given parameters.- Parameters:
arch- The processor architecture.type- The processor type.
-
-
Method Details
-
getArch
Returns 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
Returns the processor type asProcessor.Typeenum. The processor type defines, if the processor is for example a x86 or PPA.- Returns:
- A
Processor.Typeenum.
-
is32Bit
public boolean is32Bit()Checks ifProcessoris 32 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_32, elsefalse.
-
is64Bit
public boolean is64Bit()Checks ifProcessoris 64 bit.- Returns:
true, ifProcessorisProcessor.Arch.BIT_64, elsefalse.
-
isX86
public boolean isX86()Checks ifProcessoris type of x86.- Returns:
true, ifProcessorisProcessor.Type.X86, elsefalse.
-
isIA64
public boolean isIA64()Checks ifProcessoris type of Intel Itanium.- Returns:
true. ifProcessorisProcessor.Type.IA_64, elsefalse.
-
isPPC
public boolean isPPC()Checks ifProcessoris type of Power PC.- Returns:
true. ifProcessorisProcessor.Type.PPC, elsefalse.
-