Package jade
Class JadeObject
java.lang.Object
jade.JadeObject
The JadeObject class implements the object JadeObject which stores an array of JadePairs.
JadeObjects are able to be serialized and deserialized to strings by the respective tools.
JadeObjects can also be converted to Packets in order to send data in a formatted way over a TCP Server.
- Since:
- 2023
-
Constructor Summary
ConstructorDescriptionJadeObject
(JadePair[] args) Constructor of the Jade Object, initialises args. -
Method Summary
Modifier and TypeMethodDescriptionJadePair[]
getArgs()
getArgs returns the JadePair array that stores the arguments of the Jade object.boolean
isEmpty()
This method check whether the args of the Jade Object is empty, true for empty false for not.toPacket()
This method converts the current jade object to a new object of type Packet.toString()
This method returns a string representation of the Jade Object.
-
Constructor Details
-
JadeObject
Constructor of the Jade Object, initialises args.- Parameters:
args
- arguments
-
-
Method Details
-
toPacket
This method converts the current jade object to a new object of type Packet.- Returns:
- Packet
-
isEmpty
public boolean isEmpty()This method check whether the args of the Jade Object is empty, true for empty false for not.- Returns:
- boolean
-
getArgs
getArgs returns the JadePair array that stores the arguments of the Jade object.- Returns:
- JadePair[] args
-
toString
This method returns a string representation of the Jade Object.
-