Class IntReference

java.lang.Object
org.verapdf.tools.IntReference

public class IntReference extends Object
Represents int value that can be passed by reference.
Author:
Sergey Shemyakov
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor that sets integer to 0.
    IntReference(int num)
    Constructor that sets integer to given value.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Decrements internal integer.
    boolean
    equals(int num)
    Checks if internal integer equals to another int.
    int
    get()
     
    void
    Increments internal integer.
    void
    set(int num)
    Sets internal integer to given value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntReference

      public IntReference()
      Default constructor that sets integer to 0.
    • IntReference

      public IntReference(int num)
      Constructor that sets integer to given value.
      Parameters:
      num - is integer that will be stored.
  • Method Details

    • get

      public int get()
      Returns:
      integer that is represented by this reference.
    • increment

      public void increment()
      Increments internal integer.
    • decrement

      public void decrement()
      Decrements internal integer.
    • set

      public void set(int num)
      Sets internal integer to given value.
      Parameters:
      num - is value.
    • equals

      public boolean equals(int num)
      Checks if internal integer equals to another int.
      Returns:
      true if internal integer equals to passed value.