📄 numericinfo.java
字号:
/**
* This file is generated by BorlandXML.
*/
package com.prudsys.pdm.Adapters.PmmlVersion20;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* The NumericInfo class represents the element "NumericInfo" with the content
* model defined as follows:
* <p>
* <!ELEMENT NumericInfo (Quantile)*><br>
*/
public class NumericInfo extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "NumericInfo";
/** Defines a mean attribute */
public com.borland.xml.toolkit.Attribute mean = new com.borland.xml.toolkit.Attribute("mean", "CDATA", "IMPLIED", "");
/** Defines a interQuartileRange attribute */
public com.borland.xml.toolkit.Attribute interQuartileRange = new com.borland.xml.toolkit.Attribute("interQuartileRange", "CDATA", "IMPLIED", "");
/** Defines a median attribute */
public com.borland.xml.toolkit.Attribute median = new com.borland.xml.toolkit.Attribute("median", "CDATA", "IMPLIED", "");
/** Defines a standardDeviation attribute */
public com.borland.xml.toolkit.Attribute standardDeviation = new com.borland.xml.toolkit.Attribute("standardDeviation", "CDATA", "IMPLIED", "");
/** Defines a minimum attribute */
public com.borland.xml.toolkit.Attribute minimum = new com.borland.xml.toolkit.Attribute("minimum", "CDATA", "IMPLIED", "");
/** Defines a maximum attribute */
public com.borland.xml.toolkit.Attribute maximum = new com.borland.xml.toolkit.Attribute("maximum", "CDATA", "IMPLIED", "");
/** Defines a list of Quantile objects. */
protected ArrayList _objQuantile = new ArrayList();
/**
* Creates an empty NumericInfo object
*/
public NumericInfo()
{
super();
}
/**
* Gets the value of "mean" attribute.
*/
public String getMean()
{
return mean.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setMean(String value_)
{
mean.setValue(value_ );
}
/**
* Gets the value of "interQuartileRange" attribute.
*/
public String getInterQuartileRange()
{
return interQuartileRange.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setInterQuartileRange(String value_)
{
interQuartileRange.setValue(value_ );
}
/**
* Gets the value of "median" attribute.
*/
public String getMedian()
{
return median.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setMedian(String value_)
{
median.setValue(value_ );
}
/**
* Gets the value of "standardDeviation" attribute.
*/
public String getStandardDeviation()
{
return standardDeviation.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setStandardDeviation(String value_)
{
standardDeviation.setValue(value_ );
}
/**
* Gets the value of "minimum" attribute.
*/
public String getMinimum()
{
return minimum.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setMinimum(String value_)
{
minimum.setValue(value_ );
}
/**
* Gets the value of "maximum" attribute.
*/
public String getMaximum()
{
return maximum.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setMaximum(String value_)
{
maximum.setValue(value_ );
}
/**
* Returns an array of Quantile objects. The length of the returned
* array is zero if the list of Quantile object is empty.
*/
public Quantile[] getQuantile()
{
return (Quantile[])_objQuantile.toArray(new Quantile[0]);
}
/**
* Replaces all existing Quantile objects with a new array of
* Quantile objects.
* @param objArray an array of Quantile objects.
*/
public void setQuantile(Quantile[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objQuantile.clear();
else
{
this._objQuantile = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the Quantile object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public Quantile getQuantile(int index)
{
return (Quantile)_objQuantile.get(index);
}
/**
* Replaces an existing Quantile object at the specified index with
* a new Quantile object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setQuantile(int index, Quantile obj)
{
if( obj == null )
removeQuantile(index);
else
{
_objQuantile.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of Quantile objects in the list.
*/
public int getQuantileCount()
{
return _objQuantile.size();
}
/**
* Returns <code>true</code> if there is no Quantile object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoQuantile()
{
return _objQuantile.size() == 0;
}
/**
* Returns a read-only list of Quantile objects.
*/
public List getQuantileList()
{
return Collections.unmodifiableList(_objQuantile);
}
/**
* Adds a new Quantile object at the end of the list.
* @return <code>true</code> if the new object is added to the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean addQuantile(Quantile obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objQuantile.add(obj);
}
/**
* Adds a list of new Quantile objects at the end of the list.
* @return <code>true</code> if the list was changed; otherwise, the method
* returns <code>false</code>.
*/
public boolean addQuantile(Collection coQuantile)
{
if( coQuantile==null )
return false;
java.util.Iterator it = coQuantile.iterator();
while( it.hasNext() )
{
Object obj = it.next();
if( obj != null && obj instanceof com.borland.xml.toolkit.XmlObject )
((com.borland.xml.toolkit.XmlObject)obj)._setParent(this);
}
return _objQuantile.addAll(coQuantile);
}
/**
* Removes an existing Quantile object at the specified index.
* @return The removed object.
*/
public Quantile removeQuantile(int index)
{
return (Quantile)_objQuantile.remove(index);
}
/**
* Removes the specified Quantile object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeQuantile(Quantile obj)
{
return _objQuantile.remove(obj);
}
/**
* Clears all Quantile objects from the list.
*/
public void clearQuantileList()
{
_objQuantile.clear();
}
/**
* 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 "mean" attribute */
elem.addAttribute(mean.marshal());
/** Marshals "interQuartileRange" attribute */
elem.addAttribute(interQuartileRange.marshal());
/** Marshals "median" attribute */
elem.addAttribute(median.marshal());
/** Marshals "standardDeviation" attribute */
elem.addAttribute(standardDeviation.marshal());
/** Marshals "minimum" attribute */
elem.addAttribute(minimum.marshal());
/** Marshals "maximum" attribute */
elem.addAttribute(maximum.marshal());
/** Marshals a list of Quantile objects to elements */
Iterator it1 = _objQuantile.iterator();
while( it1.hasNext() )
{
Quantile obj = (Quantile)it1.next();
if( obj != null )
elem.addContent(obj.marshal());
}
return elem;
}
/**
* Unmarshals the specified "NumericInfo" element back to a NumericInfo object.
*/
public static NumericInfo unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
NumericInfo __objNumericInfo = new NumericInfo();
if( __objNumericInfo != null ) //found the element?
{
/** Unmarshals "mean" attribute */
__objNumericInfo.mean.setValue(elem.getAttribute("mean"));
/** Unmarshals "interQuartileRange" attribute */
__objNumericInfo.interQuartileRange.setValue(elem.getAttribute("interQuartileRange"));
/** Unmarshals "median" attribute */
__objNumericInfo.median.setValue(elem.getAttribute("median"));
/** Unmarshals "standardDeviation" attribute */
__objNumericInfo.standardDeviation.setValue(elem.getAttribute("standardDeviation"));
/** Unmarshals "minimum" attribute */
__objNumericInfo.minimum.setValue(elem.getAttribute("minimum"));
/** Unmarshals "maximum" attribute */
__objNumericInfo.maximum.setValue(elem.getAttribute("maximum"));
}
/** Unmarshals a list of "<<_tagName_>>" elements back to Quantile objects. */
Iterator it1 = elem.getChildren(Quantile._tagName).iterator();
while( it1.hasNext() )
__objNumericInfo.addQuantile(Quantile.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
return __objNumericInfo;
}
/**
* 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();
/** Quantile is zero or more */
Iterator it1 = _objQuantile.iterator();
while( it1.hasNext() )
{
Quantile obj = (Quantile)it1.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
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 _objQuantile */
if( _objQuantile != null && _objQuantile.size() > 0 )
children.add(_objQuantile);
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 + -