Rename height field of ObjectDefinition to length.

This commit is contained in:
Major-
2014-09-11 21:29:52 +01:00
parent 5ab6d749b5
commit c8cc7a5cd2
3 changed files with 13 additions and 14 deletions
@@ -87,7 +87,7 @@ public final class ObjectDefinitionDecoder {
} else if (opcode == 14) {
definition.setWidth(data.get() & 0xFF);
} else if (opcode == 15) {
definition.setHeight(data.get() & 0xFF);
definition.setLength(data.get() & 0xFF);
} else if (opcode == 17) {
definition.setSolid(false);
} else if (opcode == 18) {
@@ -57,8 +57,7 @@ public final class ObjectDefinition {
*/
public static ObjectDefinition lookup(int id) {
if (id < 0 || id > definitions.length) {
throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id
+ " out of bounds.");
throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id + " out of bounds.");
}
return definitions[id];
}
@@ -69,9 +68,9 @@ public final class ObjectDefinition {
private String description;
/**
* This object's height.
* This object's length.
*/
private int height;
private int length;
/**
* The object's id.
@@ -127,12 +126,12 @@ public final class ObjectDefinition {
}
/**
* Gets the height of this object.
* Gets the length of this object.
*
* @return The height.
* @return The length.
*/
public int getHeight() {
return height;
public int getLength() {
return length;
}
/**
@@ -208,12 +207,12 @@ public final class ObjectDefinition {
}
/**
* Sets the height of this object.
* Sets the length of this object.
*
* @param height The height.
* @param length The length.
*/
public void setHeight(int height) {
this.height = height;
public void setLength(int length) {
this.length = length;
}
/**