📄 partitionfieldstats.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 PartitionFieldStats class represents the element "PartitionFieldStats" with the content
* model defined as follows:
* <p>
* <!ELEMENT PartitionFieldStats (Counts?,NumericInfo?,Array*)><br>
*/
public class PartitionFieldStats extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "PartitionFieldStats";
/** Defines a field attribute */
public com.borland.xml.toolkit.Attribute field = new com.borland.xml.toolkit.Attribute("field", "CDATA", "REQUIRED", "");
/** Defines a Counts object */
protected Counts _objCounts;
/** Defines a NumericInfo object */
protected NumericInfo _objNumericInfo;
/** Defines a list of Array objects. */
protected ArrayList _objArray = new ArrayList();
/**
* Creates an empty PartitionFieldStats object
*/
public PartitionFieldStats()
{
super();
}
/**
* Gets the value of "field" attribute.
*/
public String getField()
{
return field.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setField(String value_)
{
field.setValue(value_ );
}
/**
* Gets Counts object.
*/
public Counts getCounts()
{
return _objCounts;
}
/**
* Replaces the existing Counts object with a new object.
* If you pass in a null value to this method, the Counts object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setCounts(Counts obj)
{
this._objCounts = obj;
if( obj == null )
return;
obj._setParent(this);
}
/**
* Gets NumericInfo object.
*/
public NumericInfo getNumericInfo()
{
return _objNumericInfo;
}
/**
* Replaces the existing NumericInfo object with a new object.
* If you pass in a null value to this method, the NumericInfo object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setNumericInfo(NumericInfo obj)
{
this._objNumericInfo = obj;
if( obj == null )
return;
obj._setParent(this);
}
/**
* Returns an array of Array objects. The length of the returned
* array is zero if the list of Array object is empty.
*/
public Array[] getArray()
{
return (Array[])_objArray.toArray(new Array[0]);
}
/**
* Replaces all existing Array objects with a new array of
* Array objects.
* @param objArray an array of Array objects.
*/
public void setArray(Array[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objArray.clear();
else
{
this._objArray = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the Array object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public Array getArray(int index)
{
return (Array)_objArray.get(index);
}
/**
* Replaces an existing Array object at the specified index with
* a new Array object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setArray(int index, Array obj)
{
if( obj == null )
removeArray(index);
else
{
_objArray.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of Array objects in the list.
*/
public int getArrayCount()
{
return _objArray.size();
}
/**
* Returns <code>true</code> if there is no Array object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoArray()
{
return _objArray.size() == 0;
}
/**
* Returns a read-only list of Array objects.
*/
public List getArrayList()
{
return Collections.unmodifiableList(_objArray);
}
/**
* Adds a new Array 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 addArray(Array obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objArray.add(obj);
}
/**
* Adds a list of new Array 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 addArray(Collection coArray)
{
if( coArray==null )
return false;
java.util.Iterator it = coArray.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 _objArray.addAll(coArray);
}
/**
* Removes an existing Array object at the specified index.
* @return The removed object.
*/
public Array removeArray(int index)
{
return (Array)_objArray.remove(index);
}
/**
* Removes the specified Array object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeArray(Array obj)
{
return _objArray.remove(obj);
}
/**
* Clears all Array objects from the list.
*/
public void clearArrayList()
{
_objArray.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 "field" attribute */
elem.addAttribute(field.marshal());
/** Marshals a Counts object to an element */
if( _objCounts != null )
elem.addContent(_objCounts.marshal());
/** Marshals a NumericInfo object to an element */
if( _objNumericInfo != null )
elem.addContent(_objNumericInfo.marshal());
/** Marshals a list of Array objects to elements */
Iterator it1 = _objArray.iterator();
while( it1.hasNext() )
{
Array obj = (Array)it1.next();
if( obj != null )
elem.addContent(obj.marshal());
}
return elem;
}
/**
* Unmarshals the specified "PartitionFieldStats" element back to a PartitionFieldStats object.
*/
public static PartitionFieldStats unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
PartitionFieldStats __objPartitionFieldStats = new PartitionFieldStats();
if( __objPartitionFieldStats != null ) //found the element?
{
/** Unmarshals "field" attribute */
__objPartitionFieldStats.field.setValue(elem.getAttribute("field"));
}
/** Unmarshals an element back to a Counts object */
__objPartitionFieldStats.setCounts(Counts.unmarshal(elem.getChild(Counts._tagName)));
/** Unmarshals an element back to a NumericInfo object */
__objPartitionFieldStats.setNumericInfo(NumericInfo.unmarshal(elem.getChild(NumericInfo._tagName)));
/** Unmarshals a list of "<<_tagName_>>" elements back to Array objects. */
Iterator it1 = elem.getChildren(Array._tagName).iterator();
while( it1.hasNext() )
__objPartitionFieldStats.addArray(Array.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
return __objPartitionFieldStats;
}
/**
* 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();
/** Counts is optional */
if( _objCounts != null )
{
errors.add(_objCounts.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
/** NumericInfo is optional */
if( _objNumericInfo != null )
{
errors.add(_objNumericInfo.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
/** Array is zero or more */
Iterator it1 = _objArray.iterator();
while( it1.hasNext() )
{
Array obj = (Array)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 _objCounts */
if( _objCounts != null )
children.add(_objCounts);
/** adds _objNumericInfo */
if( _objNumericInfo != null )
children.add(_objNumericInfo);
/** adds _objArray */
if( _objArray != null && _objArray.size() > 0 )
children.add(_objArray);
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 + -