Add in @Overrides across the board, clean up the comments around them some, and remove

unneeded imports.
I've got partially completed patches for narya & vilya, too, but nenya was the 
only one that wound up in a decent state after a friday evening puttering at it,
killing time waiting on other things to finish.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@572 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2008-07-14 18:19:23 +00:00
parent 1df0737bf7
commit 5f1eed7b94
137 changed files with 394 additions and 433 deletions
@@ -48,13 +48,13 @@ public class BackedVolatileMirage extends VolatileMirage
createVolatileImage();
}
// documentation inherited
@Override
protected int getTransparency ()
{
return _source.getColorModel().getTransparency();
}
// documentation inherited
@Override
protected void refreshVolatileImage ()
{
Graphics gfx = null;
@@ -70,7 +70,7 @@ public class BackedVolatileMirage extends VolatileMirage
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -56,7 +56,7 @@ public class CachedVolatileMirage extends VolatileMirage
createVolatileImage();
}
// documentation inherited
@Override
protected int getTransparency ()
{
BufferedImage source = _imgr.getImage(_source, _zations);
@@ -64,7 +64,7 @@ public class CachedVolatileMirage extends VolatileMirage
source.getColorModel().getTransparency();
}
// documentation inherited
@Override
protected void refreshVolatileImage ()
{
Graphics gfx = null;
@@ -89,7 +89,7 @@ public class CachedVolatileMirage extends VolatileMirage
}
}
// documentation inherited
@Override
protected void toString (StringBuilder buf)
{
super.toString(buf);
@@ -164,9 +164,7 @@ public class ColorPository implements Serializable
return (ColorRecord) colors.get(defaultId);
}
/**
* Returns a string representation of this instance.
*/
@Override
public String toString ()
{
return "[id=" + classId + ", name=" + name + ", source=#" +
@@ -232,9 +230,7 @@ public class ColorPository implements Serializable
cclass.range, offsets);
}
/**
* Returns a string representation of this instance.
*/
@Override
public String toString ()
{
return "[id=" + colorId + ", name=" + name +
@@ -118,15 +118,13 @@ public class Colorization
return true;
}
// documentation inherited
@Override
public int hashCode ()
{
return colorizationId ^ rootColor.hashCode();
}
/**
* Compares this colorization to another based on id.
*/
@Override
public boolean equals (Object other)
{
if (other instanceof Colorization) {
@@ -136,9 +134,7 @@ public class Colorization
}
}
/**
* Returns a string representation of this colorization.
*/
@Override
public String toString ()
{
return String.valueOf(colorizationId);
@@ -47,11 +47,13 @@ public class ImageManager
this.path = path;
}
@Override
public int hashCode ()
{
return path.hashCode() ^ daprov.getIdent().hashCode();
}
@Override
public boolean equals (Object other)
{
if (other == null || !(other instanceof ImageKey)) {
@@ -63,6 +65,7 @@ public class ImageManager
(okey.path.equals(path)));
}
@Override
public String toString ()
{
return daprov.getIdent() + ":" + path;
@@ -495,6 +498,7 @@ public class ImageManager
return usage;
}
@Override
public String toString ()
{
return "[key=" + _key + ", wid=" + _source.getWidth() + ", hei=" + _source.getHeight() +
@@ -754,6 +754,7 @@ public class Quantize {
SQUARES[((color >> 0) & 0xFF) - b + MAX_RGB]);
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
if (parent == this) {
@@ -21,7 +21,6 @@
package com.threerings.media.image;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
@@ -29,8 +28,6 @@ import java.awt.geom.AffineTransform;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.image.BufferedImage;
import static com.threerings.media.Log.log;
/**
* Draws a mirage combined with an arbitrary AffineTransform.
*/
@@ -167,9 +167,7 @@ public abstract class VolatileMirage implements Mirage
*/
protected abstract void refreshVolatileImage ();
/**
* Generates a string representation of this instance.
*/
@Override
public String toString ()
{
StringBuilder buf = new StringBuilder("[");
@@ -40,13 +40,13 @@ import com.threerings.media.image.ColorPository;
*/
public class ColorPositoryParser extends CompiledConfigParser
{
// documentation inherited
@Override
protected Serializable createConfigObject ()
{
return new ColorPository();
}
// documentation inherited
@Override
protected void addRules (Digester digest)
{
// create and configure class record instances
@@ -58,6 +58,7 @@ public class ColorPositoryParser extends CompiledConfigParser
// create and configure color record instances
prefix += "/color";
digest.addRule(prefix, new Rule() {
@Override
public void begin (String namespace, String name,
Attributes attributes) throws Exception {
// we want to inherit settings from the color class when
@@ -68,6 +69,7 @@ public class ColorPositoryParser extends CompiledConfigParser
digester.push(record);
}
@Override
public void end (String namespace, String name) throws Exception {
digester.pop();
}