com.supermap.analyst.networkanalyst
类 SupplyCenters

java.lang.Object
  继承者 com.supermap.analyst.networkanalyst.SupplyCenters

public class SupplyCenters
extends java.lang.Object

资源供给中心集合类。该类是资源供给中心对象(SupplyCenter)的集合,用于对资源供给中心对象进行管理,如添加、删除资源供给中心,返回资源供给中心对象的个数,返回指定序号的资源供给中心对象,以及将资源供给中心集合对象转换为资源供给中心对象数组等。


构造方法摘要
SupplyCenters()
          构造一个新的 SupplyCenters 对象。
SupplyCenters(SupplyCenters supplyCenters)
          根据给定的 SupplyCenters 对象构造一个与其完全相同的新对象。
 
方法摘要
 int add(SupplyCenter supplyCenter)
          添加资源供给中心对象到此集合中,添加成功返回被添加对象的序号。
 int addRange(SupplyCenter[] supplyCenter)
          以数组形式向集合中添加资源供给中心对象,添加成功,返回添加的资源供给中心对象的个数。
 void clear()
          清空集合中的资源供给中心对象。
 SupplyCenter get(int index)
          返回此资源供给中心集合对象中指定序号的资源供给中心对象。
 int getCount()
          返回资源供给中心点的个数。
 boolean remove(int index)
          在资源供给中心集合中删除指定序号的资源供给中心对象。
 int removeRange(int index, int count)
          在资源供给中心集合中从指定序号开始,删除指定个数的资源供给中心对象。
 void set(int index, SupplyCenter supplyCenter)
          设置此资源供给中心集合对象中指定序号的资源供给中心对象。
 SupplyCenter[] toArray()
          将资源供给中心集合对象转换为资源供给中心对象数组。
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SupplyCenters

public SupplyCenters()
构造一个新的 SupplyCenters 对象。


SupplyCenters

public SupplyCenters(SupplyCenters supplyCenters)
根据给定的 SupplyCenters 对象构造一个与其完全相同的新对象。

参数:
supplyCenters - 指定的 SupplyCenters 对象。
方法详细信息

getCount

public int getCount()
返回资源供给中心点的个数。

返回:
资源供给中心点的个数。

get

public SupplyCenter get(int index)
返回此资源供给中心集合对象中指定序号的资源供给中心对象。

参数:
index - 指定的序号。
返回:
指定序号的资源供给中心对象。

add

public int add(SupplyCenter supplyCenter)
添加资源供给中心对象到此集合中,添加成功返回被添加对象的序号。

参数:
supplyCenter - 待添加的资源供给中心对象。
返回:
被添加对象的序号。

addRange

public int addRange(SupplyCenter[] supplyCenter)
以数组形式向集合中添加资源供给中心对象,添加成功,返回添加的资源供给中心对象的个数。

参数:
supplyCenter - 待添加的资源供给中心对象。
返回:
添加资源供给中心对象的个数。

remove

public boolean remove(int index)
在资源供给中心集合中删除指定序号的资源供给中心对象。

参数:
index - 指定的序号。
返回:
删除成功返回 true,否则返回 false。

removeRange

public int removeRange(int index,
                       int count)
在资源供给中心集合中从指定序号开始,删除指定个数的资源供给中心对象。

参数:
index - 指定的序号。
count - 待删除的资源供给中心个数。
返回:
被成功删除的对象的个数。

clear

public void clear()
清空集合中的资源供给中心对象。


toArray

public SupplyCenter[] toArray()
将资源供给中心集合对象转换为资源供给中心对象数组。

返回:
资源供给中心对象数组。

set

public void set(int index,
                SupplyCenter supplyCenter)
设置此资源供给中心集合对象中指定序号的资源供给中心对象。

参数:
index - 指定中心点的索引。
supplyCenter - 中心点信息。