Class Bounded
java.lang.Object
application.model.simulation.bounds.BoundedGrid
application.model.simulation.bounds.Bounded
public class Bounded extends BoundedGrid
Implements a bounded grid
-
Field Summary
Fields inherited from class application.model.simulation.bounds.BoundedGrid
height, initialCoordinate, specifier, width
-
Constructor Summary
Constructors Constructor Description Bounded()
Bounded(java.lang.String specifier, Coordinate initialCoordinate)
Constructs a bounded grid -
Method Summary
Modifier and Type Method Description java.lang.String
canonise()
Canonises the specifier string of the bounded gridjava.lang.Object
clone()
java.lang.String[]
getRegex()
Gets the regex for the identifier string of the bounded gridCoordinate
map(Coordinate coordinate)
Maps a coordinate to its new positionvoid
parse(java.lang.String string)
Parses the identifier string for the bounded gridMethods inherited from class application.model.simulation.bounds.BoundedGrid
atEdge, getHeight, getInitialCoordinate, getSpecifier, getWidth, setInitialCoordinate, setSpecifier
-
Constructor Details
-
Method Details
-
parse
public void parse(java.lang.String string)Parses the identifier string for the bounded grid- Specified by:
parse
in classBoundedGrid
- Parameters:
string
- The string to parse
-
canonise
public java.lang.String canonise()Canonises the specifier string of the bounded grid- Specified by:
canonise
in classBoundedGrid
- Returns:
- Returns the canonised string
-
getRegex
public java.lang.String[] getRegex()Description copied from class:BoundedGrid
Gets the regex for the identifier string of the bounded grid- Specified by:
getRegex
in classBoundedGrid
- Returns:
- Returns the regexes for identifying the bounded grid
-
map
Description copied from class:BoundedGrid
Maps a coordinate to its new position- Specified by:
map
in classBoundedGrid
- Parameters:
coordinate
- The coordinate to map- Returns:
- Returns the new mapped coordinate
-
clone
public java.lang.Object clone()- Specified by:
clone
in classBoundedGrid
-