Package jade
Class JadePair
java.lang.Object
jade.JadePair
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFirst()
Returns the value of the first variable.Returns the value of the second variable.void
Takes in two string parameters and initialises the object.void
Sets the value of the first variable.void
Sets the value of the second variable.toString()
Returns a string representation of this Jade Pair object.
-
Constructor Details
-
JadePair
Takes in two string parameters and initialises the object.- Parameters:
first
- first valuesecond
- second value
-
JadePair
public JadePair()Takes in no parameters and initialises a null instance of JadePair.
-
-
Method Details
-
replace
Takes in two string parameters and initialises the object.- Parameters:
pair
- jade pair
-
getFirst
Returns the value of the first variable.- Returns:
- String
-
setFirst
Sets the value of the first variable.- Parameters:
first
- first value
-
getSecond
Returns the value of the second variable.- Returns:
- String
-
setSecond
Sets the value of the second variable.- Parameters:
second
- second value
-
toString
Returns a string representation of this Jade Pair object.
-