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

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

The newest version!
package org.smallmind.claxon.registry.json;

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

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

  // native fields
  private java.util.concurrent.TimeUnit windowTimeUnit;
  private org.smallmind.claxon.registry.WindowInView[] windows;

  public static TracePropertiesInView instance (TraceProperties traceProperties) {

    return new TracePropertiesInView(traceProperties);
  }

  public TracePropertiesInView () {

  }

  public TracePropertiesInView (TraceProperties traceProperties) {

    this.windowTimeUnit = traceProperties.getWindowTimeUnit();
    this.windows = org.smallmind.web.json.scaffold.property.ArrayMutator.toViewType(org.smallmind.claxon.registry.Window.class, org.smallmind.claxon.registry.WindowInView.class, traceProperties.getWindows());
  }

  public TraceProperties factory () {

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

  public TraceProperties factory (TraceProperties traceProperties) {

    traceProperties.setWindowTimeUnit(windowTimeUnit);
    traceProperties.setWindows(org.smallmind.web.json.scaffold.property.ArrayMutator.toEntityType(org.smallmind.claxon.registry.Window.class, this.windows));

    return traceProperties;
  }

  // native getters and setters
  @XmlJavaTypeAdapter(org.smallmind.claxon.registry.json.TimeUnitEnumXmlAdapter.class)
  @XmlElement(name = "windowTimeUnit")
  public java.util.concurrent.TimeUnit getWindowTimeUnit () {

    return windowTimeUnit;
  }

  public TracePropertiesInView setWindowTimeUnit (java.util.concurrent.TimeUnit windowTimeUnit) {

    this.windowTimeUnit = windowTimeUnit;

    return this;
  }

  @XmlElement(name = "windows")
  public org.smallmind.claxon.registry.WindowInView[] getWindows () {

    return windows;
  }

  public TracePropertiesInView setWindows (org.smallmind.claxon.registry.WindowInView[] windows) {

    this.windows = windows;

    return this;
  }

  @Override
  public int hashCode () {

    int h;

    h = Objects.hashCode(getWindowTimeUnit());
    h = (31 * h) + Objects.hashCode(getWindows());

    return h;
  }

  @Override
  public boolean equals (Object obj) {

    if (this == obj) {
      return true;
    } else if (!(obj instanceof TracePropertiesInView)) {
      return false;
    } else {
      if (!Objects.equals(this.getWindowTimeUnit(), ((TracePropertiesInView)obj).getWindowTimeUnit())) {
        return false;
      }
      if (!Objects.equals(this.getWindows(), ((TracePropertiesInView)obj).getWindows())) {
        return false;
      }

      return true;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy