Top Description Inners Fields Constructors Methods
org.apache.commons.lang3.arch

public Class Processor

extends Object
Class Inheritance

The Processor represents a microprocessor and defines some properties like architecture and type of the microprocessor.
Since
3.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Processor.Arch

The Arch enum defines the architecture of a microprocessor.

public static enum
Processor.Type

The Type enum defines types of a microprocessor.

Field Summary

Modifier and TypeField and Description
private final Processor.Arch
private final Processor.Type

Constructor Summary

AccessConstructor and Description
public
Processor(final Processor.Arch
The processor architecture.
arch
,
final Processor.Type
The processor type.
type
)

Constructs a Processor object with the given parameters.

Method Summary

Modifier and TypeMethod and Description
public Processor.Arch

Returns:

A Arch enum.
getArch
()

Gets the processor architecture as an Arch enum.

public Processor.Type

Returns:

A Type enum.
getType
()

Gets the processor type as Type enum.

public boolean

Returns:

true, if Processor is Arch#BIT_32, else false.
is32Bit
()

Tests if Processor is 32 bit.

public boolean

Returns:

true, if Processor is Arch#BIT_64, else false.
is64Bit
()

Tests if Processor is 64 bit.

public boolean

Returns:

true, if Processor is Type#AARCH_64, else false.
isAarch64
()

Tests if Processor is type of Aarch64.

public boolean

Returns:

true. if Processor is Type#IA_64, else false.
isIA64
()

Tests if Processor is type of Intel Itanium.

public boolean

Returns:

true. if Processor is Type#PPC, else false.
isPPC
()

Tests if Processor is type of Power PC.

public boolean

Returns:

true. if Processor is Type#RISC_V, else false.
isRISCV
()

Tests if Processor is type of RISC-V.

public boolean

Returns:

true, if Processor is Type#X86, else false.
isX86
()

Tests if Processor is type of x86.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

archback to summary
private final Processor.Arch arch
typeback to summary
private final Processor.Type type

Constructor Detail

Processorback to summary
public Processor(final Processor.Arch arch, final Processor.Type type)

Constructs a Processor object with the given parameters.

Parameters
arch:Processor.Arch

The processor architecture.

type:Processor.Type

The processor type.

Method Detail

getArchback to summary
public Processor.Arch getArch()

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

Returns:Processor.Arch

A Arch enum.

getTypeback to summary
public Processor.Type getType()

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

Returns:Processor.Type

A Type enum.

is32Bitback to summary
public boolean is32Bit()

Tests if Processor is 32 bit.

Returns:boolean

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

is64Bitback to summary
public boolean is64Bit()

Tests if Processor is 64 bit.

Returns:boolean

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

isAarch64back to summary
public boolean isAarch64()

Tests if Processor is type of Aarch64.

Returns:boolean

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

Since
3.13.0
isIA64back to summary
public boolean isIA64()

Tests if Processor is type of Intel Itanium.

Returns:boolean

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

isPPCback to summary
public boolean isPPC()

Tests if Processor is type of Power PC.

Returns:boolean

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

isRISCVback to summary
public boolean isRISCV()

Tests if Processor is type of RISC-V.

Returns:boolean

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

Since
3.14.0
isX86back to summary
public boolean isX86()

Tests if Processor is type of x86.

Returns:boolean

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

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.apache.commons.lang3.arch back to summary

public final Enum Processor.Arch

extends Enum<Processor.Arch>
Class Inheritance

The Arch enum defines the architecture of a microprocessor. The architecture represents the bit value of the microprocessor. The following architectures are defined:

Field Summary

Modifier and TypeField and Description
public static final Processor.Arch
BIT_32

A 32-bit processor architecture.

public static final Processor.Arch
BIT_64

A 64-bit processor architecture.

private final String
label

A label suitable for display.

public static final Processor.Arch
UNKNOWN

An unknown-bit processor architecture.

Constructor Summary

AccessConstructor and Description
private
Arch(final String label)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the label.
getLabel
()

Gets the label suitable for display.

public static Processor.Arch
public static Processor.Arch[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BIT_32back to summary
public static final Processor.Arch BIT_32

A 32-bit processor architecture.

BIT_64back to summary
public static final Processor.Arch BIT_64

A 64-bit processor architecture.

labelback to summary
private final String label

A label suitable for display.

UNKNOWNback to summary
public static final Processor.Arch UNKNOWN

An unknown-bit processor architecture.

Constructor Detail

Archback to summary
private Arch(final String label)

Method Detail

getLabelback to summary
public String getLabel()

Gets the label suitable for display.

Returns:String

the label.

valueOfback to summary
public static Processor.Arch valueOf(String name)
valuesback to summary
public static Processor.Arch[] values()
org.apache.commons.lang3.arch back to summary

public final Enum Processor.Type

extends Enum<Processor.Type>
Class Inheritance

The Type enum defines types of a microprocessor. The following types are defined:

Field Summary

Modifier and TypeField and Description
public static final Processor.Type
AARCH_64

ARM 64-bit.

public static final Processor.Type
IA_64

Intel Itanium 64-bit architecture.

private final String
label

A label suitable for display.

public static final Processor.Type
PPC

Apple–IBM–Motorola PowerPC architecture.

public static final Processor.Type
RISC_V

RISC-V architecture.

public static final Processor.Type
UNKNOWN

Unknown architecture.

public static final Processor.Type
X86

Intel x86 series of instruction set architectures.

Constructor Summary

AccessConstructor and Description
private
Type(final String label)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the label.
getLabel
()

Gets the label suitable for display.

public static Processor.Type
public static Processor.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AARCH_64back to summary
public static final Processor.Type AARCH_64

ARM 64-bit.

Since
3.13.0
IA_64back to summary
public static final Processor.Type IA_64

Intel Itanium 64-bit architecture.

labelback to summary
private final String label

A label suitable for display.

PPCback to summary
public static final Processor.Type PPC

Apple–IBM–Motorola PowerPC architecture.

RISC_Vback to summary
public static final Processor.Type RISC_V

RISC-V architecture.

Since
3.14.0
UNKNOWNback to summary
public static final Processor.Type UNKNOWN

Unknown architecture.

X86back to summary
public static final Processor.Type X86

Intel x86 series of instruction set architectures.

Constructor Detail

Typeback to summary
private Type(final String label)

Method Detail

getLabelback to summary
public String getLabel()

Gets the label suitable for display.

Returns:String

the label.

Since
3.13.0
valueOfback to summary
public static Processor.Type valueOf(String name)
valuesback to summary
public static Processor.Type[] values()