On this page

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

Processor(Arch, Type)

Constructs a Processor object with the given parameters.

public Processor(Processor.Arch arch, Processor.Type type)[source]

Constructs a Processor object with the given parameters.

Parameters:
  • arch – The processor architecture.

  • type – The processor type.

Methods

getArch()

Gets the processor architecture as an Arch enum.

getType()

Gets the processor type as Type enum.

is32Bit()

Tests if Processor is 32 bit.

is64Bit()

Tests if Processor is 64 bit.

isAarch64()

Tests if Processor is type of Aarch64.

isIA64()

Tests if Processor is type of Intel Itanium.

isPPC()

Tests if Processor is type of Power PC.

isRISCV()

Tests if Processor is type of RISC-V.

isX86()

Tests if Processor is type of x86.

toString()

public Processor.Arch getArch()[source]

Gets the processor architecture as an Arch enum. The processor architecture defines, if the processor has a 32 or 64 bit architecture.

Returns:

A Arch enum.

public Processor.Type getType()[source]

Gets the processor type as Type enum. The processor type defines, if the processor is for example an x86 or PPA.

Returns:

A Type enum.

public boolean is32Bit()[source]

Tests if Processor is 32 bit.

Returns:

true, if Processor is Arch#BIT_32, else false.

public boolean is64Bit()[source]

Tests if Processor is 64 bit.

Returns:

true, if Processor is Arch#BIT_64, else false.

public boolean isAarch64()[source]

Tests if Processor is type of Aarch64.

Returns:

true, if Processor is Type#AARCH_64, else false.

Since:

3.13.0

public boolean isIA64()[source]

Tests if Processor is type of Intel Itanium.

Returns:

true. if Processor is Type#IA_64, else false.

public boolean isPPC()[source]

Tests if Processor is type of Power PC.

Returns:

true. if Processor is Type#PPC, else false.

public boolean isRISCV()[source]

Tests if Processor is type of RISC-V.

Returns:

true. if Processor is Type#RISC_V, else false.

Since:

3.14.0

public boolean isX86()[source]

Tests if Processor is type of x86.

Returns:

true, if Processor is Type#X86, else false.

@Override public String toString()[source]