Class Os

  • All Implemented Interfaces:
    java.io.Serializable

    public class Os
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String _AIX  
      private static java.lang.String _LINUX  
      private static java.lang.String _SUNOS  
      private static java.util.HashMap _table_  
      private java.lang.String _value_  
      private static java.lang.String _WINDOWS  
      static Os AIX  
      static java.lang.String err  
      static Os LINUX  
      static Os SUNOS  
      static Os WINDOWS  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Os​(java.lang.String value)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Compares if a given Os object is equal to this.
      static Os fromString​(java.lang.String value)
      Creates a new Os object given an os string.
      static Os fromValue​(java.lang.String value)
      Creates a new Os object given an os string.
      java.lang.String getValue()
      Returns the value of the operating system as string.
      int hashCode()  
      java.lang.String toString()
      Returns the string value of the operating system.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _value_

        private java.lang.String _value_
      • _table_

        private static java.util.HashMap _table_
      • LINUX

        public static final Os LINUX
      • SUNOS

        public static final Os SUNOS
      • AIX

        public static final Os AIX
      • WINDOWS

        public static final Os WINDOWS
    • Constructor Detail

      • Os

        protected Os​(java.lang.String value)
    • Method Detail

      • getValue

        public java.lang.String getValue()
        Returns the value of the operating system as string.
        Returns:
        String
      • fromValue

        public static Os fromValue​(java.lang.String value)
                            throws java.lang.IllegalStateException
        Creates a new Os object given an os string.
        Parameters:
        value - String
        Returns:
        Os
        Throws:
        java.lang.IllegalStateException - Throws Exception if the operating system is not defined in this class.
      • fromString

        public static Os fromString​(java.lang.String value)
                             throws java.lang.IllegalStateException
        Creates a new Os object given an os string.
        Parameters:
        value - String
        Returns:
        Os
        Throws:
        java.lang.IllegalStateException - Throws Exception if the operating system is not defined in this class.
      • equals

        public boolean equals​(java.lang.Object obj)
        Compares if a given Os object is equal to this.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - Object
        Returns:
        boolean
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Returns the string value of the operating system.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String