📄 constant.java
字号:
/**
* This file is generated by BorlandXML.
*/
package com.prudsys.pdm.Adapters.PmmlVersion20;
/**
* The Constant class represents the element "Constant" with the content
* model defined as follows:
* <p>
* <!ELEMENT Constant (Value)><br>
*/
public class Constant extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "Constant";
/** Defines a Value object */
protected Value _objValue;
/**
* Creates an empty Constant object
*/
public Constant()
{
super();
}
/**
* Gets Value object.
*/
public Value getValue()
{
return _objValue;
}
/**
* Replaces the existing Value object with a new object.
* If you pass in a null value to this method, the Value object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setValue(Value obj)
{
this._objValue = obj;
if( obj == null )
return;
obj._setParent(this);
}
/**
* Marshals this object to an element.
*/
public com.borland.xml.toolkit.Element marshal()
{
com.borland.xml.toolkit.Element elem = new com.borland.xml.toolkit.Element(get_TagName());
/** Marshals a Value object to an element */
if( _objValue != null )
elem.addContent(_objValue.marshal());
return elem;
}
/**
* Unmarshals the specified "Constant" element back to a Constant object.
*/
public static Constant unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
Constant __objConstant = new Constant();
/** Unmarshals an element back to a Value object */
__objConstant.setValue(Value.unmarshal(elem.getChild(Value._tagName)));
return __objConstant;
}
/**
* Validates this object. If you pass <code>true</code> to this method, it
* checks for the first error and stops. On the other hand, if you pass
* <code>false</code> to this method, it collects all the errors by
* visiting every available elements.
* @param firstError <code>true</code> to exit this method when the first error
* is found; <code>false</code> to collect all errors.
* @return com.borland.xml.toolkit.ErrorList A list that contains one or more errors.
* @see com.borland.xml.toolkit.XmlObject#validate()
* @see com.borland.xml.toolkit.XmlObject#isValid()
* @see com.borland.xml.toolkit.ErrorList
*/
public com.borland.xml.toolkit.ErrorList validate(boolean firstError)
{
com.borland.xml.toolkit.ErrorList errors = new com.borland.xml.toolkit.ErrorList();
/** Value is mandatory */
if( _objValue != null )
errors.add(_objValue.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, Value.class));
if( firstError && errors.size() > 0 )
return errors;
return errors.size()==0 ? null : errors;
}
/**
* Returns a list containing all child elements. Each element in the list is a subclass
* of XmlObject.
*/
public java.util.List _getChildren()
{
java.util.List children = new java.util.ArrayList();
/** adds _objValue */
if( _objValue != null )
children.add(_objValue);
return children;
}
/**
* Gets the tag name of this element.
*/
public String get_TagName()
{
return _tagName;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -