com.connectifex.polymer.mdl.shared.generated.types.DmcTypePlasticPatternREFSV Maven / Gradle / Ivy
// Copyright 2020 connectifex
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package com.connectifex.polymer.mdl.shared.generated.types;
import java.io.Serializable;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcValueException;
/**
* The DmcTypePlasticPatternREFSV provides storage for a single-valued PlasticPatternREF
*
* This code was auto-generated and shouldn't be altered manually!
* Generated from: org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2171)
* Called from: org.dmd.dms.util.DmoTypeFormatter.dumpNamedREF(DmoTypeFormatter.java:534)
*/
@SuppressWarnings("serial")
public class DmcTypePlasticPatternREFSV extends DmcTypePlasticPatternREF implements Serializable {
protected PlasticPatternREF value;
public DmcTypePlasticPatternREFSV(){
}
public DmcTypePlasticPatternREFSV(DmcAttributeInfo ai){
super(ai);
}
public DmcTypePlasticPatternREFSV getNew(){
return(new DmcTypePlasticPatternREFSV(getAttributeInfo()));
}
public DmcTypePlasticPatternREFSV getNew(DmcAttributeInfo ai){
return(new DmcTypePlasticPatternREFSV(ai));
}
@Override
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2203)
public DmcAttribute cloneIt(){
DmcTypePlasticPatternREFSV rc = getNew();
rc.value = value;
return(rc);
}
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2214)
public PlasticPatternREF getSVCopy(){
if (value == null)
return(null);
return(cloneValue(value));
}
@Override
// org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2226)
public PlasticPatternREF set(Object v) throws DmcValueException {
PlasticPatternREF rc = typeCheck(v);
// We only return a value if the value actually changed. This supports
// the applyModifier() mechanism on DmcObject where we only return true
// if something changed as a result of the modifier
if (value == null)
value = rc;
else{
if (value.equals(rc))
rc = null;
else
value = rc;
}
return(rc);
}
@Override
public PlasticPatternREF getSV(){
return(value);
}
@Override
public int getMVSize(){
return(0);
}
}