Package squidpony.squidgrid.zone
Class ListZone
java.lang.Object
squidpony.squidgrid.zone.Zone.Skeleton
squidpony.squidgrid.zone.ListZone
- All Implemented Interfaces:
Serializable
,Iterable<Coord>
,Zone
public class ListZone extends Zone.Skeleton
A zone defined by a
List
.- Author:
- smelC
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface squidpony.squidgrid.zone.Zone
Zone.Helper, Zone.Skeleton
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class squidpony.squidgrid.zone.Zone.Skeleton
contains, extend, getCenter, getDiagonal, getExternalBorder, getHeight, getInternalBorder, getWidth, intersectsWith, iterator, translate, translate, xBound, yBound
-
Field Details
-
Constructor Details
-
Method Details
-
isEmpty
- Returns:
- Whether this zone is empty.
-
size
- Specified by:
size
in interfaceZone
- Overrides:
size
in classZone.Skeleton
- Returns:
- The number of cells that this zone contains (the size
Zone.getAll()
).
-
contains
- Specified by:
contains
in interfaceZone
- Overrides:
contains
in classZone.Skeleton
- Returns:
- Whether this zone contains
c
.
-
contains
- Specified by:
contains
in interfaceZone
- Overrides:
contains
in classZone.Skeleton
- Returns:
- Whether this zone contains the coordinate (x,y).
-
getAll
- Returns:
- All cells in this zone.
-
getState
- Returns:
- The list that backs up
this
. Use at your own risks.
-
toString
-