changed toString method to use StringBuilder
This commit is contained in:
parent
06adbd5155
commit
0f63e33da8
|
@ -60,8 +60,19 @@ public class Par56Spot extends BuntiDMXDevice {
|
|||
|
||||
@Override
|
||||
public final String toString() {
|
||||
return "Par56Spot " + getDeviceId() + ", " + getDeviceName() + " " +
|
||||
"[" + getColorRed() + "," + getColorGreen() + "," + getColorBlue() + "]";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Par56Spot ");
|
||||
sb.append(getDeviceId());
|
||||
sb.append(", ");
|
||||
sb.append(getDeviceName());
|
||||
sb.append(" [");
|
||||
sb.append(getColorRed());
|
||||
sb.append(",");
|
||||
sb.append(getColorGreen());
|
||||
sb.append(",");
|
||||
sb.append(getColorBlue());
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,10 +55,21 @@ public class Strobe1500 extends BuntiDMXDevice {
|
|||
setChannelValueByName(CHANNEL_INTENSITY, DMX.DMX_CHANNEL_VALUE_MAX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString() {
|
||||
return "Strobe1500 " + getDeviceId() + ", " + getDeviceName() +
|
||||
" [" + getSpeed() + "," + getIntensity() + "," + getMode() + "]";
|
||||
}
|
||||
@Override
|
||||
public final String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Strobe1500 ");
|
||||
sb.append(getDeviceId());
|
||||
sb.append(", ");
|
||||
sb.append(getDeviceName());
|
||||
sb.append(" [");
|
||||
sb.append(getSpeed());
|
||||
sb.append(",");
|
||||
sb.append(getIntensity());
|
||||
sb.append(",");
|
||||
sb.append(getMode());
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue