org.smallmind.claxon.registry.json.TracePropertiesInView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of claxon-registry Show documentation
Show all versions of claxon-registry Show documentation
Code Instrumentation Framework
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 = "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;
}
}
}