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

org.smallmind.claxon.registry.PercentileInView Maven / Gradle / Ivy

There is a newer version: 5.9.0
Show newest version
package org.smallmind.claxon.registry;

import java.util.Objects;
import jakarta.annotation.Generated;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlAnyElement;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@Generated("org.smallmind.web.json.doppelganger.DoppelgangerAnnotationProcessor")
@XmlRootElement(name = "percentile", namespace = "http://org.smallmind/claxon/registry")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class PercentileInView {

  // native fields
  private java.lang.String name;
  private double value;

  public static PercentileInView instance (Percentile percentile) {

    return new PercentileInView(percentile);
  }

  public PercentileInView () {

  }

  public PercentileInView (Percentile percentile) {

    this.name = percentile.getName();
    this.value = percentile.getValue();
  }

  public Percentile factory () {

    return factory(new org.smallmind.claxon.registry.Percentile());
  }

  public Percentile factory (Percentile percentile) {

    percentile.setName(name);
    percentile.setValue(value);

    return percentile;
  }

  // native getters and setters
  @XmlElement(name = "name")
  public java.lang.String getName () {

    return name;
  }

  public PercentileInView setName (java.lang.String name) {

    this.name = name;

    return this;
  }

  @XmlElement(name = "value")
  public double getValue () {

    return value;
  }

  public PercentileInView setValue (double value) {

    this.value = value;

    return this;
  }

  @Override
  public int hashCode () {

    int h;

    h = Objects.hashCode(getName());
    h = (31 * h) + Objects.hashCode(getValue());

    return h;
  }

  @Override
  public boolean equals (Object obj) {

    if (this == obj) {
      return true;
    } else if (!(obj instanceof PercentileInView)) {
      return false;
    } else {
      if (!Objects.equals(this.getName(), ((PercentileInView)obj).getName())) {
        return false;
      }
      if (!Objects.equals(this.getValue(), ((PercentileInView)obj).getValue())) {
        return false;
      }

      return true;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy