no.ks.fiks.arkiv.v1.innsyn.sok.Intvalues Maven / Gradle / Ivy
//
// This file was generated by the Eclipse Implementation of JAXB, v2.3.6
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2023.06.23 at 10:32:49 AM CEST
//
package no.ks.fiks.arkiv.v1.innsyn.sok;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.kscs.util.jaxb.Buildable;
import com.kscs.util.jaxb.PropertyTree;
import com.kscs.util.jaxb.PropertyTreeUse;
/**
* Java class for intvalues complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="intvalues">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence maxOccurs="unbounded" minOccurs="0">
* <element name="value" type="{http://www.w3.org/2001/XMLSchema}int"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "intvalues", propOrder = {
"values"
})
public class Intvalues {
@XmlElement(name = "value", type = Integer.class)
protected List values;
/**
* Gets the value of the values property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the values property.
*
*
* For example, to add a new item, do as follows:
*
* getValues().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Integer }
*
*
*/
public List getValues() {
if (values == null) {
values = new ArrayList();
}
return this.values;
}
/**
* Copies all state of this object to a builder. This method is used by the {@link
* #copyOf} method and should not be called directly by client code.
*
* @param _other
* A builder instance to which the state of this object will be copied.
*/
public<_B >void copyTo(final Intvalues.Builder<_B> _other) {
if (this.values == null) {
_other.values = null;
} else {
_other.values = new ArrayList();
for (Integer _item: this.values) {
_other.values.add(((_item == null)?null:new Buildable.PrimitiveBuildable(_item)));
}
}
}
public<_B >Intvalues.Builder<_B> newCopyBuilder(final _B _parentBuilder) {
return new Intvalues.Builder<_B>(_parentBuilder, this, true);
}
public Intvalues.Builder newCopyBuilder() {
return newCopyBuilder(null);
}
public static Intvalues.Builder builder() {
return new Intvalues.Builder(null, null, false);
}
public static<_B >Intvalues.Builder<_B> copyOf(final Intvalues _other) {
final Intvalues.Builder<_B> _newBuilder = new Intvalues.Builder<_B>(null, null, false);
_other.copyTo(_newBuilder);
return _newBuilder;
}
/**
* Copies all state of this object to a builder. This method is used by the {@link
* #copyOf} method and should not be called directly by client code.
*
* @param _other
* A builder instance to which the state of this object will be copied.
*/
public<_B >void copyTo(final Intvalues.Builder<_B> _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
final PropertyTree valuesPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("values"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(valuesPropertyTree!= null):((valuesPropertyTree == null)||(!valuesPropertyTree.isLeaf())))) {
if (this.values == null) {
_other.values = null;
} else {
_other.values = new ArrayList();
for (Integer _item: this.values) {
_other.values.add(((_item == null)?null:new Buildable.PrimitiveBuildable(_item)));
}
}
}
}
public<_B >Intvalues.Builder<_B> newCopyBuilder(final _B _parentBuilder, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
return new Intvalues.Builder<_B>(_parentBuilder, this, true, _propertyTree, _propertyTreeUse);
}
public Intvalues.Builder newCopyBuilder(final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
return newCopyBuilder(null, _propertyTree, _propertyTreeUse);
}
public static<_B >Intvalues.Builder<_B> copyOf(final Intvalues _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
final Intvalues.Builder<_B> _newBuilder = new Intvalues.Builder<_B>(null, null, false);
_other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse);
return _newBuilder;
}
public static Intvalues.Builder copyExcept(final Intvalues _other, final PropertyTree _propertyTree) {
return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE);
}
public static Intvalues.Builder copyOnly(final Intvalues _other, final PropertyTree _propertyTree) {
return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE);
}
public static class Builder<_B >implements Buildable
{
protected final _B _parentBuilder;
protected final Intvalues _storedValue;
private List values;
public Builder(final _B _parentBuilder, final Intvalues _other, final boolean _copy) {
this._parentBuilder = _parentBuilder;
if (_other!= null) {
if (_copy) {
_storedValue = null;
if (_other.values == null) {
this.values = null;
} else {
this.values = new ArrayList();
for (Integer _item: _other.values) {
this.values.add(((_item == null)?null:new Buildable.PrimitiveBuildable(_item)));
}
}
} else {
_storedValue = _other;
}
} else {
_storedValue = null;
}
}
public Builder(final _B _parentBuilder, final Intvalues _other, final boolean _copy, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) {
this._parentBuilder = _parentBuilder;
if (_other!= null) {
if (_copy) {
_storedValue = null;
final PropertyTree valuesPropertyTree = ((_propertyTree == null)?null:_propertyTree.get("values"));
if (((_propertyTreeUse == PropertyTreeUse.INCLUDE)?(valuesPropertyTree!= null):((valuesPropertyTree == null)||(!valuesPropertyTree.isLeaf())))) {
if (_other.values == null) {
this.values = null;
} else {
this.values = new ArrayList();
for (Integer _item: _other.values) {
this.values.add(((_item == null)?null:new Buildable.PrimitiveBuildable(_item)));
}
}
}
} else {
_storedValue = _other;
}
} else {
_storedValue = null;
}
}
public _B end() {
return this._parentBuilder;
}
protected<_P extends Intvalues >_P init(final _P _product) {
if (this.values!= null) {
final List values = new ArrayList(this.values.size());
for (Buildable _item: this.values) {
values.add(((Integer) _item.build()));
}
_product.values = values;
}
return _product;
}
/**
* Adds the given items to the value of "values"
*
* @param values
* Items to add to the value of the "values" property
*/
public Intvalues.Builder<_B> addValues(final Iterable extends Integer> values) {
if (values!= null) {
if (this.values == null) {
this.values = new ArrayList();
}
for (Integer _item: values) {
this.values.add(new Buildable.PrimitiveBuildable(_item));
}
}
return this;
}
/**
* Sets the new value of "values" (any previous value will be replaced)
*
* @param values
* New value of the "values" property.
*/
public Intvalues.Builder<_B> withValues(final Iterable extends Integer> values) {
if (this.values!= null) {
this.values.clear();
}
return addValues(values);
}
/**
* Adds the given items to the value of "values"
*
* @param values
* Items to add to the value of the "values" property
*/
public Intvalues.Builder<_B> addValues(Integer... values) {
addValues(Arrays.asList(values));
return this;
}
/**
* Sets the new value of "values" (any previous value will be replaced)
*
* @param values
* New value of the "values" property.
*/
public Intvalues.Builder<_B> withValues(Integer... values) {
withValues(Arrays.asList(values));
return this;
}
@Override
public Intvalues build() {
if (_storedValue == null) {
return this.init(new Intvalues());
} else {
return ((Intvalues) _storedValue);
}
}
public Intvalues.Builder<_B> copyOf(final Intvalues _other) {
_other.copyTo(this);
return this;
}
public Intvalues.Builder<_B> copyOf(final Intvalues.Builder _other) {
return copyOf(_other.build());
}
}
public static class Select
extends Intvalues.Selector
{
Select() {
super(null, null, null);
}
public static Intvalues.Select _root() {
return new Intvalues.Select();
}
}
public static class Selector , TParent >
extends com.kscs.util.jaxb.Selector
{
private com.kscs.util.jaxb.Selector> values = null;
public Selector(final TRoot root, final TParent parent, final String propertyName) {
super(root, parent, propertyName);
}
@Override
public Map buildChildren() {
final Map products = new HashMap();
products.putAll(super.buildChildren());
if (this.values!= null) {
products.put("values", this.values.init());
}
return products;
}
public com.kscs.util.jaxb.Selector> values() {
return ((this.values == null)?this.values = new com.kscs.util.jaxb.Selector>(this._root, this, "values"):this.values);
}
}
}