net.opengis.citygml.texturedsurface.v_2_0.MaterialType Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.02.26 at 04:41:00 PM AST
//
package net.opengis.citygml.texturedsurface.v_2_0;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBMergeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.MergeFrom2;
import org.jvnet.jaxb2_commons.lang.MergeStrategy2;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Deprecated since CityGML version 0.4.0. Use the concepts of the CityGML Appearance module instead. Adopted
* from X3D standard (http://www.web3d.org/x3d/)
*
* Java class for MaterialType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="MaterialType">
* <complexContent>
* <extension base="{http://www.opengis.net/citygml/texturedsurface/2.0}AbstractAppearanceType">
* <sequence>
* <element name="shininess" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
* <element name="transparency" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
* <element name="ambientIntensity" type="{http://www.opengis.net/citygml/2.0}doubleBetween0and1" minOccurs="0"/>
* <element name="specularColor" type="{http://www.opengis.net/citygml/texturedsurface/2.0}Color" minOccurs="0"/>
* <element name="diffuseColor" type="{http://www.opengis.net/citygml/texturedsurface/2.0}Color" minOccurs="0"/>
* <element name="emissiveColor" type="{http://www.opengis.net/citygml/texturedsurface/2.0}Color" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MaterialType", propOrder = {
"shininess",
"transparency",
"ambientIntensity",
"specularColor",
"diffuseColor",
"emissiveColor"
})
public class MaterialType
extends AbstractAppearanceType
implements Cloneable, CopyTo2, Equals2, HashCode2, MergeFrom2, ToString2
{
protected Double shininess;
protected Double transparency;
protected Double ambientIntensity;
@XmlList
@XmlElement(type = Double.class)
@XmlSchemaType(name = "anySimpleType")
protected List specularColor;
@XmlList
@XmlElement(type = Double.class)
@XmlSchemaType(name = "anySimpleType")
protected List diffuseColor;
@XmlList
@XmlElement(type = Double.class)
@XmlSchemaType(name = "anySimpleType")
protected List emissiveColor;
/**
* Gets the value of the shininess property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getShininess() {
return shininess;
}
/**
* Sets the value of the shininess property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setShininess(Double value) {
this.shininess = value;
}
public boolean isSetShininess() {
return (this.shininess!= null);
}
/**
* Gets the value of the transparency property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getTransparency() {
return transparency;
}
/**
* Sets the value of the transparency property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setTransparency(Double value) {
this.transparency = value;
}
public boolean isSetTransparency() {
return (this.transparency!= null);
}
/**
* Gets the value of the ambientIntensity property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getAmbientIntensity() {
return ambientIntensity;
}
/**
* Sets the value of the ambientIntensity property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setAmbientIntensity(Double value) {
this.ambientIntensity = value;
}
public boolean isSetAmbientIntensity() {
return (this.ambientIntensity!= null);
}
/**
* Gets the value of the specularColor 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 specularColor property.
*
*
* For example, to add a new item, do as follows:
*
* getSpecularColor().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Double }
*
*
*/
public List getSpecularColor() {
if (specularColor == null) {
specularColor = new ArrayList();
}
return this.specularColor;
}
public boolean isSetSpecularColor() {
return ((this.specularColor!= null)&&(!this.specularColor.isEmpty()));
}
public void unsetSpecularColor() {
this.specularColor = null;
}
/**
* Gets the value of the diffuseColor 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 diffuseColor property.
*
*
* For example, to add a new item, do as follows:
*
* getDiffuseColor().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Double }
*
*
*/
public List getDiffuseColor() {
if (diffuseColor == null) {
diffuseColor = new ArrayList();
}
return this.diffuseColor;
}
public boolean isSetDiffuseColor() {
return ((this.diffuseColor!= null)&&(!this.diffuseColor.isEmpty()));
}
public void unsetDiffuseColor() {
this.diffuseColor = null;
}
/**
* Gets the value of the emissiveColor 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 emissiveColor property.
*
*
* For example, to add a new item, do as follows:
*
* getEmissiveColor().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Double }
*
*
*/
public List getEmissiveColor() {
if (emissiveColor == null) {
emissiveColor = new ArrayList();
}
return this.emissiveColor;
}
public boolean isSetEmissiveColor() {
return ((this.emissiveColor!= null)&&(!this.emissiveColor.isEmpty()));
}
public void unsetEmissiveColor() {
this.emissiveColor = null;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
{
Double theShininess;
theShininess = this.getShininess();
strategy.appendField(locator, this, "shininess", buffer, theShininess, this.isSetShininess());
}
{
Double theTransparency;
theTransparency = this.getTransparency();
strategy.appendField(locator, this, "transparency", buffer, theTransparency, this.isSetTransparency());
}
{
Double theAmbientIntensity;
theAmbientIntensity = this.getAmbientIntensity();
strategy.appendField(locator, this, "ambientIntensity", buffer, theAmbientIntensity, this.isSetAmbientIntensity());
}
{
List theSpecularColor;
theSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null);
strategy.appendField(locator, this, "specularColor", buffer, theSpecularColor, this.isSetSpecularColor());
}
{
List theDiffuseColor;
theDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null);
strategy.appendField(locator, this, "diffuseColor", buffer, theDiffuseColor, this.isSetDiffuseColor());
}
{
List theEmissiveColor;
theEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null);
strategy.appendField(locator, this, "emissiveColor", buffer, theEmissiveColor, this.isSetEmissiveColor());
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final MaterialType that = ((MaterialType) object);
{
Double lhsShininess;
lhsShininess = this.getShininess();
Double rhsShininess;
rhsShininess = that.getShininess();
if (!strategy.equals(LocatorUtils.property(thisLocator, "shininess", lhsShininess), LocatorUtils.property(thatLocator, "shininess", rhsShininess), lhsShininess, rhsShininess, this.isSetShininess(), that.isSetShininess())) {
return false;
}
}
{
Double lhsTransparency;
lhsTransparency = this.getTransparency();
Double rhsTransparency;
rhsTransparency = that.getTransparency();
if (!strategy.equals(LocatorUtils.property(thisLocator, "transparency", lhsTransparency), LocatorUtils.property(thatLocator, "transparency", rhsTransparency), lhsTransparency, rhsTransparency, this.isSetTransparency(), that.isSetTransparency())) {
return false;
}
}
{
Double lhsAmbientIntensity;
lhsAmbientIntensity = this.getAmbientIntensity();
Double rhsAmbientIntensity;
rhsAmbientIntensity = that.getAmbientIntensity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "ambientIntensity", lhsAmbientIntensity), LocatorUtils.property(thatLocator, "ambientIntensity", rhsAmbientIntensity), lhsAmbientIntensity, rhsAmbientIntensity, this.isSetAmbientIntensity(), that.isSetAmbientIntensity())) {
return false;
}
}
{
List lhsSpecularColor;
lhsSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null);
List rhsSpecularColor;
rhsSpecularColor = (that.isSetSpecularColor()?that.getSpecularColor():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "specularColor", lhsSpecularColor), LocatorUtils.property(thatLocator, "specularColor", rhsSpecularColor), lhsSpecularColor, rhsSpecularColor, this.isSetSpecularColor(), that.isSetSpecularColor())) {
return false;
}
}
{
List lhsDiffuseColor;
lhsDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null);
List rhsDiffuseColor;
rhsDiffuseColor = (that.isSetDiffuseColor()?that.getDiffuseColor():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "diffuseColor", lhsDiffuseColor), LocatorUtils.property(thatLocator, "diffuseColor", rhsDiffuseColor), lhsDiffuseColor, rhsDiffuseColor, this.isSetDiffuseColor(), that.isSetDiffuseColor())) {
return false;
}
}
{
List lhsEmissiveColor;
lhsEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null);
List rhsEmissiveColor;
rhsEmissiveColor = (that.isSetEmissiveColor()?that.getEmissiveColor():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "emissiveColor", lhsEmissiveColor), LocatorUtils.property(thatLocator, "emissiveColor", rhsEmissiveColor), lhsEmissiveColor, rhsEmissiveColor, this.isSetEmissiveColor(), that.isSetEmissiveColor())) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
{
Double theShininess;
theShininess = this.getShininess();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "shininess", theShininess), currentHashCode, theShininess, this.isSetShininess());
}
{
Double theTransparency;
theTransparency = this.getTransparency();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "transparency", theTransparency), currentHashCode, theTransparency, this.isSetTransparency());
}
{
Double theAmbientIntensity;
theAmbientIntensity = this.getAmbientIntensity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ambientIntensity", theAmbientIntensity), currentHashCode, theAmbientIntensity, this.isSetAmbientIntensity());
}
{
List theSpecularColor;
theSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "specularColor", theSpecularColor), currentHashCode, theSpecularColor, this.isSetSpecularColor());
}
{
List theDiffuseColor;
theDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "diffuseColor", theDiffuseColor), currentHashCode, theDiffuseColor, this.isSetDiffuseColor());
}
{
List theEmissiveColor;
theEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "emissiveColor", theEmissiveColor), currentHashCode, theEmissiveColor, this.isSetEmissiveColor());
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
super.copyTo(locator, draftCopy, strategy);
if (draftCopy instanceof MaterialType) {
final MaterialType copy = ((MaterialType) draftCopy);
{
Boolean shininessShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetShininess());
if (shininessShouldBeCopiedAndSet == Boolean.TRUE) {
Double sourceShininess;
sourceShininess = this.getShininess();
Double copyShininess = ((Double) strategy.copy(LocatorUtils.property(locator, "shininess", sourceShininess), sourceShininess, this.isSetShininess()));
copy.setShininess(copyShininess);
} else {
if (shininessShouldBeCopiedAndSet == Boolean.FALSE) {
copy.shininess = null;
}
}
}
{
Boolean transparencyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetTransparency());
if (transparencyShouldBeCopiedAndSet == Boolean.TRUE) {
Double sourceTransparency;
sourceTransparency = this.getTransparency();
Double copyTransparency = ((Double) strategy.copy(LocatorUtils.property(locator, "transparency", sourceTransparency), sourceTransparency, this.isSetTransparency()));
copy.setTransparency(copyTransparency);
} else {
if (transparencyShouldBeCopiedAndSet == Boolean.FALSE) {
copy.transparency = null;
}
}
}
{
Boolean ambientIntensityShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetAmbientIntensity());
if (ambientIntensityShouldBeCopiedAndSet == Boolean.TRUE) {
Double sourceAmbientIntensity;
sourceAmbientIntensity = this.getAmbientIntensity();
Double copyAmbientIntensity = ((Double) strategy.copy(LocatorUtils.property(locator, "ambientIntensity", sourceAmbientIntensity), sourceAmbientIntensity, this.isSetAmbientIntensity()));
copy.setAmbientIntensity(copyAmbientIntensity);
} else {
if (ambientIntensityShouldBeCopiedAndSet == Boolean.FALSE) {
copy.ambientIntensity = null;
}
}
}
{
Boolean specularColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetSpecularColor());
if (specularColorShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceSpecularColor;
sourceSpecularColor = (this.isSetSpecularColor()?this.getSpecularColor():null);
@SuppressWarnings("unchecked")
List copySpecularColor = ((List ) strategy.copy(LocatorUtils.property(locator, "specularColor", sourceSpecularColor), sourceSpecularColor, this.isSetSpecularColor()));
copy.unsetSpecularColor();
if (copySpecularColor!= null) {
List uniqueSpecularColorl = copy.getSpecularColor();
uniqueSpecularColorl.addAll(copySpecularColor);
}
} else {
if (specularColorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetSpecularColor();
}
}
}
{
Boolean diffuseColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetDiffuseColor());
if (diffuseColorShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceDiffuseColor;
sourceDiffuseColor = (this.isSetDiffuseColor()?this.getDiffuseColor():null);
@SuppressWarnings("unchecked")
List copyDiffuseColor = ((List ) strategy.copy(LocatorUtils.property(locator, "diffuseColor", sourceDiffuseColor), sourceDiffuseColor, this.isSetDiffuseColor()));
copy.unsetDiffuseColor();
if (copyDiffuseColor!= null) {
List uniqueDiffuseColorl = copy.getDiffuseColor();
uniqueDiffuseColorl.addAll(copyDiffuseColor);
}
} else {
if (diffuseColorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetDiffuseColor();
}
}
}
{
Boolean emissiveColorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, this.isSetEmissiveColor());
if (emissiveColorShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceEmissiveColor;
sourceEmissiveColor = (this.isSetEmissiveColor()?this.getEmissiveColor():null);
@SuppressWarnings("unchecked")
List copyEmissiveColor = ((List ) strategy.copy(LocatorUtils.property(locator, "emissiveColor", sourceEmissiveColor), sourceEmissiveColor, this.isSetEmissiveColor()));
copy.unsetEmissiveColor();
if (copyEmissiveColor!= null) {
List uniqueEmissiveColorl = copy.getEmissiveColor();
uniqueEmissiveColorl.addAll(copyEmissiveColor);
}
} else {
if (emissiveColorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.unsetEmissiveColor();
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new MaterialType();
}
public void mergeFrom(Object left, Object right) {
final MergeStrategy2 strategy = JAXBMergeStrategy.INSTANCE;
mergeFrom(null, null, left, right, strategy);
}
public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy2 strategy) {
super.mergeFrom(leftLocator, rightLocator, left, right, strategy);
if (right instanceof MaterialType) {
final MaterialType target = this;
final MaterialType leftObject = ((MaterialType) left);
final MaterialType rightObject = ((MaterialType) right);
{
Boolean shininessShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetShininess(), rightObject.isSetShininess());
if (shininessShouldBeMergedAndSet == Boolean.TRUE) {
Double lhsShininess;
lhsShininess = leftObject.getShininess();
Double rhsShininess;
rhsShininess = rightObject.getShininess();
Double mergedShininess = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "shininess", lhsShininess), LocatorUtils.property(rightLocator, "shininess", rhsShininess), lhsShininess, rhsShininess, leftObject.isSetShininess(), rightObject.isSetShininess()));
target.setShininess(mergedShininess);
} else {
if (shininessShouldBeMergedAndSet == Boolean.FALSE) {
target.shininess = null;
}
}
}
{
Boolean transparencyShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetTransparency(), rightObject.isSetTransparency());
if (transparencyShouldBeMergedAndSet == Boolean.TRUE) {
Double lhsTransparency;
lhsTransparency = leftObject.getTransparency();
Double rhsTransparency;
rhsTransparency = rightObject.getTransparency();
Double mergedTransparency = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "transparency", lhsTransparency), LocatorUtils.property(rightLocator, "transparency", rhsTransparency), lhsTransparency, rhsTransparency, leftObject.isSetTransparency(), rightObject.isSetTransparency()));
target.setTransparency(mergedTransparency);
} else {
if (transparencyShouldBeMergedAndSet == Boolean.FALSE) {
target.transparency = null;
}
}
}
{
Boolean ambientIntensityShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetAmbientIntensity(), rightObject.isSetAmbientIntensity());
if (ambientIntensityShouldBeMergedAndSet == Boolean.TRUE) {
Double lhsAmbientIntensity;
lhsAmbientIntensity = leftObject.getAmbientIntensity();
Double rhsAmbientIntensity;
rhsAmbientIntensity = rightObject.getAmbientIntensity();
Double mergedAmbientIntensity = ((Double) strategy.merge(LocatorUtils.property(leftLocator, "ambientIntensity", lhsAmbientIntensity), LocatorUtils.property(rightLocator, "ambientIntensity", rhsAmbientIntensity), lhsAmbientIntensity, rhsAmbientIntensity, leftObject.isSetAmbientIntensity(), rightObject.isSetAmbientIntensity()));
target.setAmbientIntensity(mergedAmbientIntensity);
} else {
if (ambientIntensityShouldBeMergedAndSet == Boolean.FALSE) {
target.ambientIntensity = null;
}
}
}
{
Boolean specularColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetSpecularColor(), rightObject.isSetSpecularColor());
if (specularColorShouldBeMergedAndSet == Boolean.TRUE) {
List lhsSpecularColor;
lhsSpecularColor = (leftObject.isSetSpecularColor()?leftObject.getSpecularColor():null);
List rhsSpecularColor;
rhsSpecularColor = (rightObject.isSetSpecularColor()?rightObject.getSpecularColor():null);
List mergedSpecularColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "specularColor", lhsSpecularColor), LocatorUtils.property(rightLocator, "specularColor", rhsSpecularColor), lhsSpecularColor, rhsSpecularColor, leftObject.isSetSpecularColor(), rightObject.isSetSpecularColor()));
target.unsetSpecularColor();
if (mergedSpecularColor!= null) {
List uniqueSpecularColorl = target.getSpecularColor();
uniqueSpecularColorl.addAll(mergedSpecularColor);
}
} else {
if (specularColorShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetSpecularColor();
}
}
}
{
Boolean diffuseColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetDiffuseColor(), rightObject.isSetDiffuseColor());
if (diffuseColorShouldBeMergedAndSet == Boolean.TRUE) {
List lhsDiffuseColor;
lhsDiffuseColor = (leftObject.isSetDiffuseColor()?leftObject.getDiffuseColor():null);
List rhsDiffuseColor;
rhsDiffuseColor = (rightObject.isSetDiffuseColor()?rightObject.getDiffuseColor():null);
List mergedDiffuseColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "diffuseColor", lhsDiffuseColor), LocatorUtils.property(rightLocator, "diffuseColor", rhsDiffuseColor), lhsDiffuseColor, rhsDiffuseColor, leftObject.isSetDiffuseColor(), rightObject.isSetDiffuseColor()));
target.unsetDiffuseColor();
if (mergedDiffuseColor!= null) {
List uniqueDiffuseColorl = target.getDiffuseColor();
uniqueDiffuseColorl.addAll(mergedDiffuseColor);
}
} else {
if (diffuseColorShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetDiffuseColor();
}
}
}
{
Boolean emissiveColorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, leftObject.isSetEmissiveColor(), rightObject.isSetEmissiveColor());
if (emissiveColorShouldBeMergedAndSet == Boolean.TRUE) {
List lhsEmissiveColor;
lhsEmissiveColor = (leftObject.isSetEmissiveColor()?leftObject.getEmissiveColor():null);
List rhsEmissiveColor;
rhsEmissiveColor = (rightObject.isSetEmissiveColor()?rightObject.getEmissiveColor():null);
List mergedEmissiveColor = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "emissiveColor", lhsEmissiveColor), LocatorUtils.property(rightLocator, "emissiveColor", rhsEmissiveColor), lhsEmissiveColor, rhsEmissiveColor, leftObject.isSetEmissiveColor(), rightObject.isSetEmissiveColor()));
target.unsetEmissiveColor();
if (mergedEmissiveColor!= null) {
List uniqueEmissiveColorl = target.getEmissiveColor();
uniqueEmissiveColorl.addAll(mergedEmissiveColor);
}
} else {
if (emissiveColorShouldBeMergedAndSet == Boolean.FALSE) {
target.unsetEmissiveColor();
}
}
}
}
}
public void setSpecularColor(List value) {
this.specularColor = null;
if (value!= null) {
List draftl = this.getSpecularColor();
draftl.addAll(value);
}
}
public void setDiffuseColor(List value) {
this.diffuseColor = null;
if (value!= null) {
List draftl = this.getDiffuseColor();
draftl.addAll(value);
}
}
public void setEmissiveColor(List value) {
this.emissiveColor = null;
if (value!= null) {
List draftl = this.getEmissiveColor();
draftl.addAll(value);
}
}
public MaterialType withShininess(Double value) {
setShininess(value);
return this;
}
public MaterialType withTransparency(Double value) {
setTransparency(value);
return this;
}
public MaterialType withAmbientIntensity(Double value) {
setAmbientIntensity(value);
return this;
}
public MaterialType withSpecularColor(Double... values) {
if (values!= null) {
for (Double value: values) {
getSpecularColor().add(value);
}
}
return this;
}
public MaterialType withSpecularColor(Collection values) {
if (values!= null) {
getSpecularColor().addAll(values);
}
return this;
}
public MaterialType withDiffuseColor(Double... values) {
if (values!= null) {
for (Double value: values) {
getDiffuseColor().add(value);
}
}
return this;
}
public MaterialType withDiffuseColor(Collection values) {
if (values!= null) {
getDiffuseColor().addAll(values);
}
return this;
}
public MaterialType withEmissiveColor(Double... values) {
if (values!= null) {
for (Double value: values) {
getEmissiveColor().add(value);
}
}
return this;
}
public MaterialType withEmissiveColor(Collection values) {
if (values!= null) {
getEmissiveColor().addAll(values);
}
return this;
}
public MaterialType withSpecularColor(List value) {
setSpecularColor(value);
return this;
}
public MaterialType withDiffuseColor(List value) {
setDiffuseColor(value);
return this;
}
public MaterialType withEmissiveColor(List value) {
setEmissiveColor(value);
return this;
}
}