com.supermap.analyst.networkanalyst
Class WeightFieldInfos
- java.lang.Object
-
- com.supermap.analyst.networkanalyst.WeightFieldInfos
-
public class WeightFieldInfos extends java.lang.Object
The WeightFieldInfo class is the collection of the weight field information objects(WeightFieldInfo
), which is used to manage the weight field information such as Add, Delete, getting the weight filed information of the specified name and index.
-
-
Constructor Summary
Constructors Constructor and Description WeightFieldInfos()
Initializes a new instance of WeightFieldInfos.WeightFieldInfos(WeightFieldInfos weightFieldInfos)
Constructs a new object identical to the given WeightFieldInfos object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
add(WeightFieldInfo value)
Adds a new WeightFieldInfo object in the WeightFieldInfos.void
clear()
Clears all the WeightFieldInfo objects in the WeightFieldInfos.WeightFieldInfo
get(int index)
Gets the WeightFieldInfo object in the WeightFieldInfos object according to the specified index.WeightFieldInfo
get(java.lang.String name)
Gets the WeightFieldInfo in the WeightFieldInfos according to the specified name.int
getCount()
Gets the count of the WeightFieldInfo in the given WeightFieldInfos.int
indexOf(java.lang.String name)
Gets the index of the WeightFieldInfo according to the given name.boolean
remove(int index)
Removes the WeightFieldInfo object from the WeightFieldInfos according to the specified index.boolean
remove(java.lang.String name)
Removes the WeightFieldInfo object from the WeightFieldInfos according to the specified name.
-
-
-
Constructor Detail
-
WeightFieldInfos
public WeightFieldInfos()
Initializes a new instance of WeightFieldInfos.
-
WeightFieldInfos
public WeightFieldInfos(WeightFieldInfos weightFieldInfos)
Constructs a new object identical to the given WeightFieldInfos object.- Parameters:
weightFieldInfos
- The specified WeightFieldInfos object.
-
-
Method Detail
-
clear
public void clear()
Clears all the WeightFieldInfo objects in the WeightFieldInfos. The cleared WeightFieldInfo objects are disposed.
-
add
public int add(WeightFieldInfo value)
Adds a new WeightFieldInfo object in the WeightFieldInfos.- Parameters:
value
- The WeightFieldInfo object to be added.- Returns:
- The index of the new WeightFieldInfo object.
-
remove
public boolean remove(java.lang.String name)
Removes the WeightFieldInfo object from the WeightFieldInfos according to the specified name. The removed WeightFieldInfo object is disposed.- Parameters:
name
- The specified name of the WeightFieldInfo to be removed.- Returns:
- True if it is removed successfully; false otherwise.
-
remove
public boolean remove(int index)
Removes the WeightFieldInfo object from the WeightFieldInfos according to the specified index. The removed WeightFieldInfo object is disposed.- Parameters:
index
- The index of the element to remove.- Returns:
- True if it is removed successfully; false otherwise.
-
indexOf
public int indexOf(java.lang.String name)
Gets the index of the WeightFieldInfo according to the given name.- Parameters:
name
- The name of the WeightFieldInfo to index.- Returns:
- Returns the index of the WeightFieldInfo in the WeightFieldInfos.
-
getCount
public int getCount()
Gets the count of the WeightFieldInfo in the given WeightFieldInfos.- Returns:
- Gets the count of the WeightFieldInfo in the given WeightFieldInfos.
-
get
public WeightFieldInfo get(java.lang.String name)
Gets the WeightFieldInfo in the WeightFieldInfos according to the specified name.- Parameters:
name
- The specified name. The value isWeightFieldInfo.getName()
. It is used to search the WeightFieldInfo object.- Returns:
- The WeightFieldInfo object in the WeightFieldInfos object.
-
get
public WeightFieldInfo get(int index)
Gets the WeightFieldInfo object in the WeightFieldInfos object according to the specified index.- Parameters:
index
- The specified index which starts with 0.- Returns:
- The WeightFieldInfo object in the WeightFieldInfos object.
-
-