use of org.apache.commons.lang.builder.ToStringBuilder in project openhab1-addons by openhab.
the class WeatherBindingConfig method toString.
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
tsb.append("locationId", locationId).append("type", type).append("property", property);
if (roundingMode != null) {
tsb.append("roundingMode", roundingMode).append("scale", scale);
}
if (unit != null) {
tsb.append("unit", unit.toString());
}
return tsb.toString();
}
use of org.apache.commons.lang.builder.ToStringBuilder in project openhab1-addons by openhab.
the class Weather method toString.
/**
* {@inheritDoc}
*/
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
if (this instanceof org.openhab.binding.weather.internal.model.Forecast) {
tsb.append("day", ((org.openhab.binding.weather.internal.model.Forecast) this).getDay());
}
tsb.append(temperature).append(atmosphere).append(clouds).append(condition).append(precipitation).append(wind).append(station).append(error);
return tsb.toString();
}
use of org.apache.commons.lang.builder.ToStringBuilder in project openhab1-addons by openhab.
the class AstroConfig method toString.
@Override
public String toString() {
String intervallMessage = (interval == 0 ? "disabled" : String.valueOf(interval));
TimeZone tz = TimeZone.getDefault();
StringBuilder tzInfo = new StringBuilder();
tzInfo.append(tz.getID());
tzInfo.append(" (").append(tz.getDisplayName(false, TimeZone.SHORT)).append(" ").append(new SimpleDateFormat("Z").format(Calendar.getInstance().getTime()));
tzInfo.append(")");
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("latitude", latitude).append("longitude", longitude).append("interval", intervallMessage).append("systemTimezone", tzInfo.toString()).append("daylightSavings", Calendar.getInstance().get(Calendar.DST_OFFSET) != 0).toString();
}
use of org.apache.commons.lang.builder.ToStringBuilder in project openhab1-addons by openhab.
the class RefreshTokenRequest method toString.
@Override
public String toString() {
final ToStringBuilder builder = createToStringBuilder();
builder.appendSuper(super.toString());
builder.append("clientId", this.clientId);
builder.append("clientSecret", this.clientSecret);
builder.append("refreshToken", this.refreshToken);
return builder.toString();
}
use of org.apache.commons.lang.builder.ToStringBuilder in project openhab1-addons by openhab.
the class GetHomeDataRequest method toString.
@Override
public String toString() {
final ToStringBuilder builder = createToStringBuilder();
builder.appendSuper(super.toString());
builder.append("accessToken", this.accessToken);
return builder.toString();
}
Aggregations