|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrepast.simphony.space.gis.ShapefileLoader<T>
public class ShapefileLoader<T>
Creates and sets agents properties from a features in shapefile.
| Constructor Summary | |
|---|---|
ShapefileLoader(Class<T> clazz,
URL shapefile,
Geography geography,
Context context)
Creates a shapefile loader for agents of the specified class and whose data source is the specified shapefile. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if there are more features left to process, otherwise false. |
void |
load()
Creates all the agents for the shapefile features, setting each agent's properteis to the value of a feature's relevant attributes. |
T |
next()
Creates the next agent from the next feature in the shapefile, setting that agent's properties to the value of that feature's relevant attributes. |
T |
next(T obj)
Sets the specified object's properties to the relevant attributes values of the next feature. |
T |
nextWithArgs(Object... constructorArgs)
Creates the next agent from the next feature in the shapefile, setting that agent's properties to the value of that feature's relevant attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShapefileLoader(Class<T> clazz,
URL shapefile,
Geography geography,
Context context)
clazz - the agent classshapefile - the shapefile that serves as the datasource for the agent
propertiesgeography - the geography to hold spatial locations of the agentscontext - the context to add the agents to| Method Detail |
|---|
public void load()
public T next()
public T nextWithArgs(Object... constructorArgs)
throws IllegalArgumentException
constructorArgs - parameters to pass to the constructor when
creating the agent.
IllegalArgumentException - if the constructor args don't match a
constructor.public T next(T obj)
obj - the object whose properties we want to set.
public boolean hasNext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||