/** * @return <code>true</code> if the this OS is the current OS. */ public boolean isCurrentOS () { return this == getCurrentOS (); }
/** * @return The name and version of the operating system we're running on. */ @Nonnull public static String getOperatingSystemName () { return EOperatingSystem.getCurrentOSName () + " [" + EOperatingSystem.getCurrentOSVersion () + "]"; }
/** * @return The current OS. Never <code>null</code>. */ @Nonnull public static EOperatingSystem getCurrentOS () { EOperatingSystem ret = s_aInstance; if (ret == null) { // Note: double initialization doesn't matter here final String sCurrentOSName = getCurrentOSName (); ret = forName (sCurrentOSName); s_aInstance = ret; if (ret == UNKNOWN) LoggerFactory.getLogger (EOperatingSystem.class).error ("Failed to resolve operating system from name '" + sCurrentOSName + "'!!!"); } return ret; }
SystemHelper.getOperatingSystem ().getDisplayName () + " / " + SystemHelper.getOperatingSystemName ());
/** * @return The operating system we're running on. */ @Nonnull public static EOperatingSystem getOperatingSystem () { return EOperatingSystem.getCurrentOS (); }