public class RoverBlockCode extends java.lang.Object implements Immutable
This is a wrapper to provide an easy and standard way to interpret the flags.
The layout is as follows, reading from right (low bit 0) to left (high bit 7)
Nonstandard or legacy rover binary formats may use a different byte representation; in those cases this is simply a data structure and not a required format.
Copyright 2008-2009 Partner Software, Inc.
| Constructor and Description |
|---|
RoverBlockCode(int code)
Creates a RoverBlockCode
|
RoverBlockCode(RoverShapeType type,
boolean hasData,
boolean hasZ,
boolean hasRotations,
boolean hasOffsets) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getCode() |
RoverShapeType |
getShapeType() |
int |
getShapeTypeCode() |
boolean |
hasData()
Returns true if the block has data.
|
boolean |
hasOffsets()
Returns true if the block has shapes with offsets.
|
boolean |
hasRotations()
Returns true if the block has shapes with rotations.
|
boolean |
hasZ()
Returns true if the block has data.
|
java.lang.String |
toString() |
public RoverBlockCode(int code)
public RoverBlockCode(RoverShapeType type, boolean hasData, boolean hasZ, boolean hasRotations, boolean hasOffsets)
public java.lang.String toString()
toString in class java.lang.Objectpublic byte getCode()
public int getShapeTypeCode()
public RoverShapeType getShapeType()
public boolean hasData()
public boolean hasZ()
public boolean hasRotations()
public boolean hasOffsets()