Package jade

Class JadePair

java.lang.Object
jade.JadePair

public class JadePair extends Object
The JadePair acts like a tuple, it stores both a String value of first and second. This normally acts like a key pair with the first being the key and the second being the data it pertains to.
Since:
2023
  • Constructor Details

    • JadePair

      public JadePair(String first, String second)
      Takes in two string parameters and initialises the object.
      Parameters:
      first - first value
      second - second value
    • JadePair

      public JadePair()
      Takes in no parameters and initialises a null instance of JadePair.
  • Method Details

    • replace

      public void replace(JadePair pair)
      Takes in two string parameters and initialises the object.
      Parameters:
      pair - jade pair
    • getFirst

      public String getFirst()
      Returns the value of the first variable.
      Returns:
      String
    • setFirst

      public void setFirst(String first)
      Sets the value of the first variable.
      Parameters:
      first - first value
    • getSecond

      public String getSecond()
      Returns the value of the second variable.
      Returns:
      String
    • setSecond

      public void setSecond(String second)
      Sets the value of the second variable.
      Parameters:
      second - second value
    • toString

      public String toString()
      Returns a string representation of this Jade Pair object.
      Overrides:
      toString in class Object
      Returns:
      String