All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.scravy.jazz.RgbColor Maven / Gradle / Ivy

// Generated by delombok at Tue May 26 01:14:02 CEST 2015
package de.scravy.jazz;

/**
 * @since 1.0.0
 * @author Julian Fleischer
 */
final class RgbColor implements Color {
  private final int r;
  private final int g;
  private final int b;
  private final int a;

  public RgbColor(final int r, final int g, final int b) {
    this(r, g, b, 255);
  }

  @Override
  public java.awt.Color getAWTColor() {
    return new java.awt.Color(this.r, this.g, this.b);
  }

  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public int getR() {
    return this.r;
  }

  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public int getG() {
    return this.g;
  }

  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public int getB() {
    return this.b;
  }

  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public int getA() {
    return this.a;
  }

  @Override
  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public boolean equals(final Object o) {
    if (o == this) return true;
    if (!(o instanceof RgbColor)) return false;
    final RgbColor other = (RgbColor)o;
    if (this.getR() != other.getR()) return false;
    if (this.getG() != other.getG()) return false;
    if (this.getB() != other.getB()) return false;
    if (this.getA() != other.getA()) return false;
    return true;
  }

  @Override
  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public int hashCode() {
    final int PRIME = 59;
    int result = 1;
    result = result * PRIME + this.getR();
    result = result * PRIME + this.getG();
    result = result * PRIME + this.getB();
    result = result * PRIME + this.getA();
    return result;
  }

  @Override
  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public String toString() {
    return "RgbColor(r=" + this.getR() + ", g=" + this.getG() + ", b=" + this.getB() + ", a=" + this.getA() + ")";
  }

  @java.beans.ConstructorProperties({"r", "g", "b", "a"})
  @SuppressWarnings("all")
  @javax.annotation.Generated("lombok")
  public RgbColor(final int r, final int g, final int b, final int a) {
    this.r = r;
    this.g = g;
    this.b = b;
    this.a = a;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy