com.supermap.analyst.networkanalyst

Class SupplyCenters

  • java.lang.Object
    • com.supermap.analyst.networkanalyst.SupplyCenters


  • public class SupplyCenters
    extends java.lang.Object
    The resource supply center collection class. This class is the collection of the {SupplyCenter}. This class provides the methods of adding and removing the SupplyCenterobjects, and also provides the method of converting the SupplyCenter object to a SupplyCenterarray. You can get the count of the SupplyCenter objects, and get or set the SupplyCenterobject with the specified index through this class.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SupplyCenters()
      Creates a new instance of the SupplyCenters.
      SupplyCenters(SupplyCenters supplyCenters)
      Initializes a new instance according to the specified SupplyCenters object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int add(SupplyCenter supplyCenter)
      Adds the SupplyCenter object to this SupplyCenters object.
      int addRange(SupplyCenter[] supplyCenter)
      Adds the SupplyCenter objects to the SupplyCenters in the form of an array.
      void clear()
      Clears all the objects in the SupplyCenters.
      SupplyCenter get(int index)
      Gets the specified index of the SupplyCenter object from the SupplyCenters.
      int getCount()
      Gets the count of the SupplyCenters object.
      boolean remove(int index)
      Removes the SupplyCenter object with the specified index.
      int removeRange(int index, int count)
      Removes the specified count of the SupplyCenter objects starting from the specified index.
      void set(int index, SupplyCenter supplyCenter)
      Sets the specified index of the SupplyCenter object from the SupplyCenters.
      SupplyCenter[] toArray()
      Converts the current SupplyCenters object to a SupplyCenter array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SupplyCenters

        public SupplyCenters()
        Creates a new instance of the SupplyCenters.
      • SupplyCenters

        public SupplyCenters(SupplyCenters supplyCenters)
        Initializes a new instance according to the specified SupplyCenters object.
        Parameters:
        supplyCenters - The specified SupplyCenters objects.
    • Method Detail

      • getCount

        public int getCount()
        Gets the count of the SupplyCenters object.
        Returns:
        The count of the SupplyCenters object.
      • get

        public SupplyCenter get(int index)
        Gets the specified index of the SupplyCenter object from the SupplyCenters.
        Parameters:
        index - The specified index.
        Returns:
        The SupplyCenter object to be specified its index.
      • set

        public void set(int index,
                        SupplyCenter supplyCenter)
        Sets the specified index of the SupplyCenter object from the SupplyCenters.
        Parameters:
        index - The index of the specified center.
        supplyCenter - center point information.
      • add

        public int add(SupplyCenter supplyCenter)
        Adds the SupplyCenter object to this SupplyCenters object. Return the index of the newly added object if added successfully.
        Parameters:
        supplyCenter - The SupplyCenter objects to be added.
        Returns:
        The index of the object to be added.
      • addRange

        public int addRange(SupplyCenter[] supplyCenter)
        Adds the SupplyCenter objects to the SupplyCenters in the form of an array. Return the count of the newly added SupplyCenter objects if added successfully.
        Parameters:
        supplyCenter - The SupplyCenter objects to be added.
        Returns:
        The count of the added SupplyCenter objects.
      • remove

        public boolean remove(int index)
        Removes the SupplyCenter object with the specified index.
        Parameters:
        index - The specified index.
        Returns:
        returns true if successful; otherwise false.
      • removeRange

        public int removeRange(int index,
                               int count)
        Removes the specified count of the SupplyCenter objects starting from the specified index.
        Parameters:
        index - The specified index.
        count - The count of the SupplyCenter objects to be removed.
        Returns:
        The count of the object deleted successfully.
      • clear

        public void clear()
        Clears all the objects in the SupplyCenters.
      • toArray

        public SupplyCenter[] toArray()
        Converts the current SupplyCenters object to a SupplyCenter array.
        Returns:
        The array of the SupplyCenter objects.