@Override public int hashCode() { int tmp = 10000 * getHue().hashCode(); tmp += 100 * getSaturation().hashCode(); tmp += getBrightness().hashCode(); return tmp; }
@Override public int hashCode() { int tmp = 10000 * getLatitude().hashCode(); tmp += 100 * getLongitude().hashCode(); tmp += getAltitude().hashCode(); return tmp; }
/** * Constructs a HSBType instance with the given values * * @param h the hue value in the range from 0 <= h < 360 * @param s the saturation as a percent value * @param b the brightness as a percent value */ public HSBType(DecimalType h, PercentType s, PercentType b) { this.hue = h.toBigDecimal(); this.saturation = s.toBigDecimal(); this.value = b.toBigDecimal(); validateValue(this.hue, this.saturation, this.value); }
public PointType(StringType latitude, StringType longitude, StringType altitude) { this(new DecimalType(latitude.toString()), new DecimalType(longitude.toString()), new DecimalType(altitude.toString())); }
/** * Static access to {@link QuantityType#QuantityType(double, Unit)}. * * @param value the non null measurement value. * @param unit the non null measurement unit. * @return a new {@link QuantityType} */ public static <T extends Quantity<T>> QuantityType<T> valueOf(double value, Unit<T> unit) { return new QuantityType<T>(value, unit); }
/** * Returns the RGB value representing the color in the default sRGB * color model. * (Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue). * * @return the RGB value of the color in the default sRGB color model */ public int getRGB() { PercentType[] rgb = toRGB(); return ((0xFF) << 24) | ((convertPercentToByte(rgb[0]) & 0xFF) << 16) | ((convertPercentToByte(rgb[1]) & 0xFF) << 8) | ((convertPercentToByte(rgb[2]) & 0xFF) << 0); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
public PointType(DecimalType latitude, DecimalType longitude, DecimalType altitude) { this(latitude, longitude); setAltitude(altitude); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
@Override public String toString() { return toFullString(); }
public PercentType(BigDecimal value) { super(value); validateValue(this.value); }
@Override public String toString() { return toFullString(); }
public PointType(StringType latitude, StringType longitude) { this(new DecimalType(latitude.toString()), new DecimalType(longitude.toString())); }