Class IntValue

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int value  
    • Constructor Summary

      Constructors 
      Constructor Description
      IntValue​(int _value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ScalarType copyValue()
      create a clone of this scalar's value.
      double doubleValue()
      convert the scalar to a double
      java.lang.Class getType()
      returns the Class type of this ScalarType.
      int intValue()
      convert the scalar to an int
      long longValue()
      convert the scalar to a long
      java.lang.Object objectValue()
      convert the scalar to an object value *shrug*
      java.lang.String toString()
      convert the scalar to a string
      • Methods inherited from class java.lang.Object

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

      • value

        protected int value
    • Constructor Detail

      • IntValue

        public IntValue​(int _value)
    • Method Detail

      • copyValue

        public ScalarType copyValue()
        Description copied from interface: ScalarType
        create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want scalars of your scalar type to be passed by reference.
        Specified by:
        copyValue in interface ScalarType
      • intValue

        public int intValue()
        Description copied from interface: ScalarType
        convert the scalar to an int
        Specified by:
        intValue in interface ScalarType
      • longValue

        public long longValue()
        Description copied from interface: ScalarType
        convert the scalar to a long
        Specified by:
        longValue in interface ScalarType
      • doubleValue

        public double doubleValue()
        Description copied from interface: ScalarType
        convert the scalar to a double
        Specified by:
        doubleValue in interface ScalarType
      • toString

        public java.lang.String toString()
        Description copied from interface: ScalarType
        convert the scalar to a string
        Specified by:
        toString in interface ScalarType
        Overrides:
        toString in class java.lang.Object
      • objectValue

        public java.lang.Object objectValue()
        Description copied from interface: ScalarType
        convert the scalar to an object value *shrug*
        Specified by:
        objectValue in interface ScalarType
      • getType

        public java.lang.Class getType()
        Description copied from interface: ScalarType
        returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking functionality
        Specified by:
        getType in interface ScalarType