Package jade

Class JadeObject

java.lang.Object
jade.JadeObject

public class JadeObject extends Object
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

    Constructors
    Constructor
    Description
    Constructor of the Jade Object, initialises args.
  • Method Summary

    Modifier and Type
    Method
    Description
    getArgs returns the JadePair array that stores the arguments of the Jade object.
    boolean
    This method check whether the args of the Jade Object is empty, true for empty false for not.
    This method converts the current jade object to a new object of type Packet.
    This method returns a string representation of the Jade Object.

    Methods inherited from class java.lang.Object

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

    • JadeObject

      public JadeObject(JadePair[] args)
      Constructor of the Jade Object, initialises args.
      Parameters:
      args - arguments
  • Method Details

    • toPacket

      public Packet 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

      public JadePair[] getArgs()
      getArgs returns the JadePair array that stores the arguments of the Jade object.
      Returns:
      JadePair[] args
    • toString

      public String toString()
      This method returns a string representation of the Jade Object.
      Overrides:
      toString in class Object
      Returns:
      String