Class Value


  • public class Value
    extends java.lang.Object
    Value

    The human readable value of the option

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Value._Deserializer  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      static Value of​(boolean value)  
      static Value of​(double value)  
      static Value of​(Four value)  
      static Value of​(java.lang.String value)  
      static Value of​(java.util.List<java.lang.Object> value)  
      java.lang.String toString()  
      java.lang.Object value()
      Returns an instance of one of these types: java.lang.String double boolean com.stackone.stackone_client_java.models.components.Four java.util.List<java.lang.Object>
      • Methods inherited from class java.lang.Object

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

      • of

        public static Value of​(java.lang.String value)
      • of

        public static Value of​(double value)
      • of

        public static Value of​(boolean value)
      • of

        public static Value of​(Four value)
      • of

        public static Value of​(java.util.List<java.lang.Object> value)
      • value

        public java.lang.Object value()
        Returns an instance of one of these types:
        • java.lang.String
        • double
        • boolean
        • com.stackone.stackone_client_java.models.components.Four
        • java.util.List<java.lang.Object>

        Use instanceof to determine what type is returned. For example:

         if (obj.value() instanceof String) {
             String answer = (String) obj.value();
             System.out.println("answer=" + answer);
         }
         
        Returns:
        value of oneOf type
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object