Enum Class CPUArchitectures

java.lang.Object
java.lang.Enum<CPUArchitectures>
dev.hydraulic.types.machines.CPUArchitectures
All Implemented Interfaces:
CPUArchitecture, MachineCompatibilityAspect, Serializable, Comparable<CPUArchitectures>, Constable

public enum CPUArchitectures extends Enum<CPUArchitectures> implements CPUArchitecture

Major CPU architecture families and common names for them.

When writing code prefer to use the CPUArchitecture interface rather than this enum directly. This will allow other people to create new CPU architecture objects and pass them into your code.

CPU architectures are included here if they materially affect application binary compatibility at the granularity of a download. Therefore most minor variants such as ISA extensions aren't modelled. Inclusion criteria are similar to those for the OperatingSystems enum: the CPU must be in general use for computing devices that can have software installed on them. DSPs, proprietary architectures that are used only within a company etc would not be considered, but can still be modelled by creating a custom object that implements CPUArchitecture. Extinct CPU architectures are also not included, but could be added by a third party library.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    64 bit ARM as used in modern phones, Apple Silicon etc.
    The modern 64 bit version of the x86 architecture.
    32 bit ARM as used in older devices.
    The 64 bit variant of the open source RISC-V architecture.
    For representing an unknown architecture, or where the CPU architecture is irrelevant.
    The classic 32 bit architecture.
    The z/Architecture used in IBM mainframes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String,CPUArchitecture>
    An unmodifiable map of lower case names and aliases of well known operating systems.
  • Method Summary

    Modifier and Type
    Method
    Description
    A set containing the identifier and any other strings that are widely used in the industry to identify this OS, all in lower case.
    Should return the display name of an operating system, suitable for presentation to humans.
    The operating system name in a form suitable for use as an identifier in code or filing systems, i.e.
    Returns the display name of the organization that makes this OS, or "Open source".
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • X86

      public static final CPUArchitectures X86
      The classic 32 bit architecture. Vendor is Intel, aliases are x86, i386, x32, x86_32, x86-32. Vendor is Intel.
    • AMD64

      public static final CPUArchitectures AMD64
      The modern 64 bit version of the x86 architecture. Aliases are amd64, x64, x86-64, x86_64. Vendor is AMD.
    • AARCH64

      public static final CPUArchitectures AARCH64
      64 bit ARM as used in modern phones, Apple Silicon etc. Aliases are aarch64, arm64, armv8.
    • ARM7

      public static final CPUArchitectures ARM7
      32 bit ARM as used in older devices. Aliases are arm32, arm.
    • RISCV

      public static final CPUArchitectures RISCV
      The 64 bit variant of the open source RISC-V architecture. Aliases are riscv, riscv64, risc-v, vendor is "Open source".
    • ZARCH

      public static final CPUArchitectures ZARCH
      The z/Architecture used in IBM mainframes.
    • UNKNOWN

      public static final CPUArchitectures UNKNOWN
      For representing an unknown architecture, or where the CPU architecture is irrelevant. Vendor is "unknown". Aliases are "unknown" and "other".
  • Field Details

    • ALIAS_MAP

      public static final Map<String,CPUArchitecture> ALIAS_MAP
      An unmodifiable map of lower case names and aliases of well known operating systems.
  • Method Details

    • values

      public static CPUArchitectures[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CPUArchitectures valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: MachineCompatibilityAspect
      Should return the display name of an operating system, suitable for presentation to humans. The display name may have unusual capitalization, slashes in the middle of it etc.
      Specified by:
      getDisplayName in interface MachineCompatibilityAspect
    • getIdentifier

      public String getIdentifier()
      Description copied from interface: MachineCompatibilityAspect
      The operating system name in a form suitable for use as an identifier in code or filing systems, i.e. all lower case with no punctuation or symbols.
      Specified by:
      getIdentifier in interface MachineCompatibilityAspect
    • getAliases

      public Set<String> getAliases()
      Description copied from interface: MachineCompatibilityAspect
      A set containing the identifier and any other strings that are widely used in the industry to identify this OS, all in lower case. Unlike MachineCompatibilityAspect.getIdentifier(), the strings returned here may contain punctuation or space characters.
      Specified by:
      getAliases in interface MachineCompatibilityAspect
    • getVendor

      public String getVendor()
      Description copied from interface: MachineCompatibilityAspect
      Returns the display name of the organization that makes this OS, or "Open source".
      Specified by:
      getVendor in interface MachineCompatibilityAspect