Class IntegerHolder


  • public final class IntegerHolder
    extends java.lang.Object
    A mutable holder class to represent an int value. IntegerHolder objects are useful as out and inout parameters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int value
      The int value held by this object.
    • Constructor Summary

      Constructors 
      Constructor Description
      IntegerHolder()
      Instantiates an IntegerHolder object with the initial value 0.
      IntegerHolder​(int value)
      Instantiates an IntegerHolder object with the initial value given.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        public int value
        The int value held by this object.
    • Constructor Detail

      • IntegerHolder

        public IntegerHolder()
        Instantiates an IntegerHolder object with the initial value 0.
      • IntegerHolder

        public IntegerHolder​(int value)
        Instantiates an IntegerHolder object with the initial value given.
        Parameters:
        value - the initial value.