Class Platforms

java.lang.Object
pcap.common.util.Platforms

@Inclubating
public final class Platforms
extends Object
Author:
Ardika Rommy Sanjaya
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  Platforms.Architecture  
    static class  Platforms.Name  
  • Method Summary

    Modifier and Type Method Description
    static Platforms.Architecture architecture()
    Get platform architecture.
    static String cpuVersion()
    Get Cpu Version.
    static boolean is32Bit()
    Returns true if 32-bit architecture, false otherwise.
    static boolean is64Bit()
    Returns true if 64-bit architecture, false otherwise.
    static boolean isAmd()
    Returns true if Amd platform, false otherwise.
    static boolean isAndroid()
    Returns true if Android platform, false otherwise.
    static boolean isArm()
    Returns true if Arm architecture, false otherwise.
    static boolean isDarwin()
    Returns true if Darwin (MacOs) platform, false otherwise.
    static boolean isFreeBsd()
    Returns true if FreeBsd platform, false otherwise.
    static boolean isIntel()
    Returns true if Intel platform, false otherwise.
    static boolean isLinux()
    Returns true if Linux platform, false otherwise.
    static boolean isWindows()
    Returns true if Windows platform, false otherwise.
    static int javaMojorVersion()
    Get java major version.
    static Platforms.Name name()
    Get platform name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • name

      public static Platforms.Name name()
      Get platform name.
      Returns:
      returns platform name.
    • architecture

      public static Platforms.Architecture architecture()
      Get platform architecture.
      Returns:
      returns platform architecture.
    • isWindows

      public static boolean isWindows()
      Returns true if Windows platform, false otherwise.
      Returns:
      returns true if windows platform, false otherwise.
    • isLinux

      public static boolean isLinux()
      Returns true if Linux platform, false otherwise.
      Returns:
      returns true if linux platform, false otherwise.
    • isAndroid

      public static boolean isAndroid()
      Returns true if Android platform, false otherwise.
      Returns:
      returns true if android platform, false otherwise.
    • isFreeBsd

      public static boolean isFreeBsd()
      Returns true if FreeBsd platform, false otherwise.
      Returns:
      returns true if FreeBsd platform, false otherwise.
    • isDarwin

      public static boolean isDarwin()
      Returns true if Darwin (MacOs) platform, false otherwise.
      Returns:
      returns true if Darwin (MacOs) platform, false otherwise.
    • is32Bit

      public static boolean is32Bit()
      Returns true if 32-bit architecture, false otherwise.
      Returns:
      returns true if 32-bit architecture, false otherwise.
    • is64Bit

      public static boolean is64Bit()
      Returns true if 64-bit architecture, false otherwise.
      Returns:
      returns true if 64-bit architecture, false otherwise.
    • isArm

      public static boolean isArm()
      Returns true if Arm architecture, false otherwise.
      Returns:
      returns true if Arm architecture, false otherwise.
    • isIntel

      public static boolean isIntel()
      Returns true if Intel platform, false otherwise.
      Returns:
      returns true if Intel platform, false otherwise.
    • isAmd

      public static boolean isAmd()
      Returns true if Amd platform, false otherwise.
      Returns:
      returns true if Amd platform, false otherwise.
    • cpuVersion

      public static String cpuVersion()
      Get Cpu Version.
      Returns:
      returns Cpu version.
    • javaMojorVersion

      public static int javaMojorVersion()
      Get java major version.
      Returns:
      returns java major version.
      Since:
      1.2.3