Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## swarm.space
Interface Grid2d

All Known Implementing Classes:
  Grid2dImpl

public interface Grid2d
extends Discrete2d, Discrete2dS

A 2d container class for agents.. Grid2d is a generic container class to represent agent position on a 2d lattice. It gets most of its behaviour from Discrete2d, adding extra code to check that you don't overwrite things by accident. Grid2d is pretty primitive: only one object can be stored at a site, no boundary conditions are implied, etc.

Method Summary
`java.lang.Object` | `putObject$atX$Y(java.lang.Object anObject, int x, int y)` Replaces the Discrete2d method.
`java.lang.Object` | `setOverwriteWarnings(boolean b)` If set to true, then if you try to store something at a site that doesn't have 0x0 there, a warning will be generated.

Methods inherited from interface swarm.space.Discrete2d
`copyDiscrete2d$toDiscrete2d, fastFillWithObject, fastFillWithValue, fillWithObject, fillWithValue, putValue$atX$Y, setDiscrete2d$toFile`

Methods inherited from interface swarm.space.Discrete2dS
`setObjectFlag`

Methods inherited from interface swarm.objectbase.SwarmObject
`getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap`

Methods inherited from interface swarm.space.GridData
`getObjectAtX$Y, getSizeX, getSizeY, getValueAtX$Y`

Methods inherited from interface swarm.defobj.Drop
`drop`

Methods inherited from interface swarm.defobj.DefinedObject
`compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid`

Methods inherited from interface swarm.defobj.GetName
`getName`

Method Detail

### putObject$atX$Y

    public java.lang.Object putObject$atX$Y(java.lang.Object anObject,
                                            int x,
                                            int y)

  Replaces the Discrete2d method. First check to see if it should do overwrite warnings, and if so if you're going to overwrite: if both conditions are true, print out a warning message. Regardless of the check, it writes the new object in.
  Specified by:
    putObject$atX$Y in interface Discrete2d

### setOverwriteWarnings

    public java.lang.Object setOverwriteWarnings(boolean b)

  If set to true, then if you try to store something at a site that doesn't have 0x0 there, a warning will be generated.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD