util

Clone or download

Added back serial version UID (removed by mistake)

Modified Files

/*
/*
Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad
Stream-Pi - Free & Open-Source Modular Cross-Platform Programmable Macro Pad
Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones)
Copyright (C) 2019-2021 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones)
This program is free software: you can redistribute it and/or modify
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
Originally Written by : Debayan Sutradhar (rnayabed)
Originally Written by : Debayan Sutradhar (rnayabed)
*/
*/
package com.stream_pi.util.comms;
package com.stream_pi.util.comms;
import java.io.Serializable;
import java.io.Serializable;
/**
/**
* Message class to be sent between Server and Client using sockets
* Message class to be sent between Server and Client using sockets
*/
*/
public class Message implements Serializable
public class Message implements Serializable
{
{
private final String header;
private final String header;
private static final long serialVersionUID = 2004200019671976L;
private String[] stringArrValue;
private String[] stringArrValue;
private String stringValue;
private String stringValue;
private byte[] byteArrValue;
private byte[] byteArrValue;
private int intValue;
private int intValue;
private int[] intArrValue;
private int[] intArrValue;
private double doubleValue;
private double doubleValue;
private double[] doubleArrValue;
private double[] doubleArrValue;
/**
/**
* Default Constructor for Message
* Default Constructor for Message
* @param header Message Header Text
* @param header Message Header Text
*/
*/
public Message(String header)
public Message(String header)
{
{
this.header = header;
this.header = header;
}
}
/**
/**
* @param doubleArrValue Double Array
* @param doubleArrValue Double Array
*/
*/
public void setDoubleArrValue(double... doubleArrValue)
public void setDoubleArrValue(double... doubleArrValue)
{
{
this.doubleArrValue = doubleArrValue;
this.doubleArrValue = doubleArrValue;
}
}
/**
/**
* @return Double Array
* @return Double Array
*/
*/
public double[] getDoubleArrValue()
public double[] getDoubleArrValue()
{
{
return doubleArrValue;
return doubleArrValue;
}
}
/**
/**
* @param doubleValue Double argument
* @param doubleValue Double argument
*/
*/
public void setDoubleValue(double doubleValue)
public void setDoubleValue(double doubleValue)
{
{
this.doubleValue = doubleValue;
this.doubleValue = doubleValue;
}
}
/**
/**
* @return Double argument
* @return Double argument
*/
*/
public double getDoubleValue()
public double getDoubleValue()
{
{
return doubleValue;
return doubleValue;
}
}
public void setIntArrValue(int... intArrValue)
public void setIntArrValue(int... intArrValue)
{
{
this.intArrValue = intArrValue;
this.intArrValue = intArrValue;
}
}
public int[] getIntArrValue()
public int[] getIntArrValue()
{
{
return intArrValue;
return intArrValue;
}
}
public void setIntValue(int intValue)
public void setIntValue(int intValue)
{
{
this.intValue = intValue;
this.intValue = intValue;
}
}
public int getIntValue()
public int getIntValue()
{
{
return intValue;
return intValue;
}
}
public void setByteArrValue(byte[] byteArrValue)
public void setByteArrValue(byte[] byteArrValue)
{
{
this.byteArrValue = byteArrValue;
this.byteArrValue = byteArrValue;
}
}
public void setStringArrValue(String... stringArrValue)
public void setStringArrValue(String... stringArrValue)
{
{
this.stringArrValue = stringArrValue;
this.stringArrValue = stringArrValue;
}
}
public void setStringValue(String stringValue)
public void setStringValue(String stringValue)
{
{
this.stringValue = stringValue;
this.stringValue = stringValue;
}
}
public String getHeader()
public String getHeader()
{
{
return header;
return header;
}
}
public byte[] getByteArrValue()
public byte[] getByteArrValue()
{
{
return byteArrValue;
return byteArrValue;
}
}
public String[] getStringArrValue()
public String[] getStringArrValue()
{
{
return stringArrValue;
return stringArrValue;
}
}
public String getStringValue()
public String getStringValue()
{
{
return stringValue;
return stringValue;
}
}
}
}