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
|
@Override
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
return "Par56Spot " + getDeviceId() + ", " + getDeviceName() + " " +
|
StringBuilder sb = new StringBuilder();
|
||||||
"[" + getColorRed() + "," + getColorGreen() + "," + getColorBlue() + "]";
|
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);
|
setChannelValueByName(CHANNEL_INTENSITY, DMX.DMX_CHANNEL_VALUE_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final String toString() {
|
public final String toString() {
|
||||||
return "Strobe1500 " + getDeviceId() + ", " + getDeviceName() +
|
StringBuilder sb = new StringBuilder();
|
||||||
" [" + getSpeed() + "," + getIntensity() + "," + getMode() + "]";
|
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