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

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

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

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

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

  public static WindowInView instance (Window window) {

    return new WindowInView(window);
  }

  public WindowInView () {

  }

  public WindowInView (Window window) {

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

  public Window factory () {

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

  public Window factory (Window window) {

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

    return window;
  }

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

    return name;
  }

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

    this.name = name;

    return this;
  }

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

    return value;
  }

  public WindowInView setValue (long 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 WindowInView)) {
      return false;
    } else {
      if (!Objects.equals(this.getName(), ((WindowInView)obj).getName())) {
        return false;
      }
      if (!Objects.equals(this.getValue(), ((WindowInView)obj).getValue())) {
        return false;
      }

      return true;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy