Package org.planit.zoning
Class ZonesImpl<Z extends Zone>
- java.lang.Object
-
- org.planit.zoning.ZonesImpl<Z>
-
- Type Parameters:
Z
- zone type
- Direct Known Subclasses:
OdZonesImpl
,TransferZonesImpl
public abstract class ZonesImpl<Z extends Zone> extends Object implements Zones<Z>
Partial implementation of the Zones <T> interface- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description ZonesImpl(IdGroupingToken tokenId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Z
get(long id)
Retrieve zone by its Idprotected IdGroupingToken
getGroupingTokenId()
access to the id generation tokenIterator<Z>
iterator()
Z
register(Z zone)
Add zone to the internal container.int
size()
Collect number of zones-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.planit.utils.zoning.Zones
getNumberOfCentroids, isEmpty, registerNew
-
-
-
-
Constructor Detail
-
ZonesImpl
public ZonesImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId
- to use for id generation
-
-
Method Detail
-
getGroupingTokenId
protected IdGroupingToken getGroupingTokenId()
access to the id generation token- Returns:
- id grouping token
-
register
public Z register(Z zone)
Add zone to the internal container. Use carefully to avoid issues with internal contiguous ids
-
get
public Z get(long id)
Retrieve zone by its Id
-
-