⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 partition.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 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 Partition class represents the element "Partition" with the content
 * model defined as follows:
 * <p>
 * &lt;!ELEMENT Partition (PartitionFieldStats)+&gt;<br>
 */
public class Partition extends com.borland.xml.toolkit.XmlObject 
{
	/** xml tag name of this element. */
	public static String _tagName = "Partition";
	/** Defines a name attribute */
	public com.borland.xml.toolkit.Attribute name = new com.borland.xml.toolkit.Attribute("name", "CDATA", "REQUIRED", "");
	/** Defines a size attribute */
	public com.borland.xml.toolkit.Attribute size = new com.borland.xml.toolkit.Attribute("size", "CDATA", "IMPLIED", "");
	/** Defines a list of PartitionFieldStats objects. */
	protected ArrayList _objPartitionFieldStats = new ArrayList();

	/**
	 * Creates an empty Partition object
	 */
	public Partition()
	{
		super();
	}

	/**
	 * Gets the value of "name" attribute.
	 */
	public String getName()
	{
		return name.getValue();
	}

	/**
	 * Replaces the existing attribute value with a new value.
	 * @param value	New value.
	 */
	public void setName(String value_)
	{
		name.setValue(value_ );
	}

	/**
	 * Gets the value of "size" attribute.
	 */
	public String getSize()
	{
		return size.getValue();
	}

	/**
	 * Replaces the existing attribute value with a new value.
	 * @param value	New value.
	 */
	public void setSize(String value_)
	{
		size.setValue(value_ );
	}

	/**
	 * Returns an array of PartitionFieldStats objects. The length of the returned
	 * array is zero if the list of PartitionFieldStats object is empty.
	 */
	public PartitionFieldStats[] getPartitionFieldStats()
	{
		return (PartitionFieldStats[])_objPartitionFieldStats.toArray(new PartitionFieldStats[0]);
	}

	/**
	 * Replaces all existing PartitionFieldStats objects with a new array of
	 * PartitionFieldStats objects.
	 * @param objArray	an array of PartitionFieldStats objects.
	 */
	public void setPartitionFieldStats(PartitionFieldStats[] objArray)
	{
		if( objArray == null || objArray.length == 0 )
			this._objPartitionFieldStats.clear();
		else
		{
			this._objPartitionFieldStats = new ArrayList(Arrays.asList(objArray));
			for( int i=0; i<objArray.length; i++ )
			{
				if( objArray[i] != null )
					objArray[i]._setParent(this);
			}
		}
	}

	/**
	 * Gets the PartitionFieldStats object at the specified index.
	 * @param index	index of the returned object.
	 * @throws IndexOutOfBoundsException	if index is out of range.
	 */
	public PartitionFieldStats getPartitionFieldStats(int index)
	{
		return (PartitionFieldStats)_objPartitionFieldStats.get(index);
	}

	/**
	 * Replaces an existing PartitionFieldStats object at the specified index with
	 * a new PartitionFieldStats object.
	 * @param index	index of replaced object.
	 * @throws IndexOutOfBoundsException	if index is out of range.
	 */
	public void setPartitionFieldStats(int index, PartitionFieldStats obj)
	{
		if( obj == null )
			removePartitionFieldStats(index);
		else
		{
			_objPartitionFieldStats.set(index, obj);
			obj._setParent(this);
		}
	}

	/**
	 * Returns the number of PartitionFieldStats objects in the list.
	 */
	public int getPartitionFieldStatsCount()
	{
		return _objPartitionFieldStats.size();
	}

	/**
	 * Returns <code>true</code> if there is no PartitionFieldStats object in the list; otherwise,
	 * the method returns <code>false</code>.
	 */
	public boolean isNoPartitionFieldStats()
	{
		return _objPartitionFieldStats.size() == 0;
	}

	/**
	 * Returns a read-only list of PartitionFieldStats objects.
	 */
	public List getPartitionFieldStatsList()
	{
		return Collections.unmodifiableList(_objPartitionFieldStats);
	}

	/**
	 * Adds a new PartitionFieldStats 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 addPartitionFieldStats(PartitionFieldStats obj)
	{
		if( obj==null )
			return false;

		obj._setParent(this);
		return _objPartitionFieldStats.add(obj);
	}

	/**
	 * Adds a list of new PartitionFieldStats 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 addPartitionFieldStats(Collection coPartitionFieldStats)
	{
		if( coPartitionFieldStats==null )
			return false;

		java.util.Iterator it = coPartitionFieldStats.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 _objPartitionFieldStats.addAll(coPartitionFieldStats);
	}

	/**
	 * Removes an existing PartitionFieldStats object at the specified index.
	 * @return	The removed object.
	 */
	public PartitionFieldStats removePartitionFieldStats(int index)
	{
		return (PartitionFieldStats)_objPartitionFieldStats.remove(index);
	}

	/**
	 * Removes the specified PartitionFieldStats object.
	 * @return <code>true</code> if this list contains the object; otherwise,
	 * the method returns <code>false</code>.
	 */
	public boolean removePartitionFieldStats(PartitionFieldStats obj)
	{
		return _objPartitionFieldStats.remove(obj);
	}

	/**
	 * Clears all PartitionFieldStats objects from the list.
	 */
	public void clearPartitionFieldStatsList()
	{
		_objPartitionFieldStats.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 "name" attribute */
		elem.addAttribute(name.marshal());
		/** Marshals "size" attribute */
		elem.addAttribute(size.marshal());
		/** Marshals a list of PartitionFieldStats objects to elements */
		Iterator it1 = _objPartitionFieldStats.iterator();
		while( it1.hasNext() )
		{
			PartitionFieldStats obj = (PartitionFieldStats)it1.next();
			if( obj != null )
				elem.addContent(obj.marshal());
		}

		return elem;
	}

	/**
	 * Unmarshals the specified "Partition" element back to a Partition object.
	 */
	public static Partition unmarshal(com.borland.xml.toolkit.Element elem)
	{
		if( elem == null )
			return null;

		Partition __objPartition = new Partition();
		if( __objPartition != null ) //found the element?
		{
			/** Unmarshals "name" attribute */
			__objPartition.name.setValue(elem.getAttribute("name"));
			/** Unmarshals "size" attribute */
			__objPartition.size.setValue(elem.getAttribute("size"));
		}
		/** Unmarshals a list of "<<_tagName_>>" elements back to PartitionFieldStats objects. */
		Iterator it1 = elem.getChildren(PartitionFieldStats._tagName).iterator();
		while( it1.hasNext() )
			__objPartition.addPartitionFieldStats(PartitionFieldStats.unmarshal((com.borland.xml.toolkit.Element)it1.next()));

		return __objPartition;
	}

	/**
	 * 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();

		/** PartitionFieldStats is one or more */
		if( _objPartitionFieldStats.size() == 0 )
		{
			errors.add(new com.borland.xml.toolkit.ElementError(this, PartitionFieldStats.class));
			if( firstError )
				return errors;
		}
		else
		{
			Iterator it1 = _objPartitionFieldStats.iterator();
			while( it1.hasNext() )
			{
				PartitionFieldStats obj = (PartitionFieldStats)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 _objPartitionFieldStats */
		if( _objPartitionFieldStats != null && _objPartitionFieldStats.size() > 0 )
			children.add(_objPartitionFieldStats);
		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 + -