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

org.smallmind.claxon.registry.json.HistogramPropertiesInView Maven / Gradle / Ivy

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

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 = "histogramProperties", namespace = "http://org.smallmind/claxon/registry")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class HistogramPropertiesInView {

  // native fields
  private org.smallmind.nutsnbolts.time.Stint resolutionStint;
  private org.smallmind.claxon.registry.PercentileInView[] percentiles;
  private java.lang.Integer numberOfSignificantValueDigits;
  private java.lang.Long lowestDiscernibleValue;
  private java.lang.Long highestTrackableValue;

  public static HistogramPropertiesInView instance (HistogramProperties histogramProperties) {

    return new HistogramPropertiesInView(histogramProperties);
  }

  public HistogramPropertiesInView () {

  }

  public HistogramPropertiesInView (HistogramProperties histogramProperties) {

    this.resolutionStint = histogramProperties.getResolutionStint();
    this.percentiles = org.smallmind.web.json.scaffold.property.ArrayMutator.toViewType(org.smallmind.claxon.registry.Percentile.class, org.smallmind.claxon.registry.PercentileInView.class, histogramProperties.getPercentiles());
    this.numberOfSignificantValueDigits = histogramProperties.getNumberOfSignificantValueDigits();
    this.lowestDiscernibleValue = histogramProperties.getLowestDiscernibleValue();
    this.highestTrackableValue = histogramProperties.getHighestTrackableValue();
  }

  public HistogramProperties factory () {

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

  public HistogramProperties factory (HistogramProperties histogramProperties) {

    histogramProperties.setResolutionStint(resolutionStint);
    histogramProperties.setPercentiles(org.smallmind.web.json.scaffold.property.ArrayMutator.toEntityType(org.smallmind.claxon.registry.Percentile.class, this.percentiles));
    histogramProperties.setNumberOfSignificantValueDigits(numberOfSignificantValueDigits);
    histogramProperties.setLowestDiscernibleValue(lowestDiscernibleValue);
    histogramProperties.setHighestTrackableValue(highestTrackableValue);

    return histogramProperties;
  }

  // native getters and setters
  @XmlJavaTypeAdapter(org.smallmind.claxon.registry.json.StintXmlAdapter.class)
  @XmlElement(name = "resolutionStint")
  public org.smallmind.nutsnbolts.time.Stint getResolutionStint () {

    return resolutionStint;
  }

  public HistogramPropertiesInView setResolutionStint (org.smallmind.nutsnbolts.time.Stint resolutionStint) {

    this.resolutionStint = resolutionStint;

    return this;
  }

  @XmlElement(name = "percentiles")
  public org.smallmind.claxon.registry.PercentileInView[] getPercentiles () {

    return percentiles;
  }

  public HistogramPropertiesInView setPercentiles (org.smallmind.claxon.registry.PercentileInView[] percentiles) {

    this.percentiles = percentiles;

    return this;
  }

  @XmlElement(name = "numberOfSignificantValueDigits")
  public java.lang.Integer getNumberOfSignificantValueDigits () {

    return numberOfSignificantValueDigits;
  }

  public HistogramPropertiesInView setNumberOfSignificantValueDigits (java.lang.Integer numberOfSignificantValueDigits) {

    this.numberOfSignificantValueDigits = numberOfSignificantValueDigits;

    return this;
  }

  @XmlElement(name = "lowestDiscernibleValue")
  public java.lang.Long getLowestDiscernibleValue () {

    return lowestDiscernibleValue;
  }

  public HistogramPropertiesInView setLowestDiscernibleValue (java.lang.Long lowestDiscernibleValue) {

    this.lowestDiscernibleValue = lowestDiscernibleValue;

    return this;
  }

  @XmlElement(name = "highestTrackableValue")
  public java.lang.Long getHighestTrackableValue () {

    return highestTrackableValue;
  }

  public HistogramPropertiesInView setHighestTrackableValue (java.lang.Long highestTrackableValue) {

    this.highestTrackableValue = highestTrackableValue;

    return this;
  }

  @Override
  public int hashCode () {

    int h;

    h = Objects.hashCode(getResolutionStint());
    h = (31 * h) + Objects.hashCode(getPercentiles());
    h = (31 * h) + Objects.hashCode(getNumberOfSignificantValueDigits());
    h = (31 * h) + Objects.hashCode(getLowestDiscernibleValue());
    h = (31 * h) + Objects.hashCode(getHighestTrackableValue());

    return h;
  }

  @Override
  public boolean equals (Object obj) {

    if (this == obj) {
      return true;
    } else if (!(obj instanceof HistogramPropertiesInView)) {
      return false;
    } else {
      if (!Objects.equals(this.getResolutionStint(), ((HistogramPropertiesInView)obj).getResolutionStint())) {
        return false;
      }
      if (!Objects.equals(this.getPercentiles(), ((HistogramPropertiesInView)obj).getPercentiles())) {
        return false;
      }
      if (!Objects.equals(this.getNumberOfSignificantValueDigits(), ((HistogramPropertiesInView)obj).getNumberOfSignificantValueDigits())) {
        return false;
      }
      if (!Objects.equals(this.getLowestDiscernibleValue(), ((HistogramPropertiesInView)obj).getLowestDiscernibleValue())) {
        return false;
      }
      if (!Objects.equals(this.getHighestTrackableValue(), ((HistogramPropertiesInView)obj).getHighestTrackableValue())) {
        return false;
      }

      return true;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy