From 5640073272d72333dad3ebe6d5c8fd272665045c Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Tue, 16 Jan 2007 21:43:42 +0000 Subject: [PATCH] Add a new value accessor for byte values. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4504 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/dobj/AttributeChangedEvent.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/com/threerings/presents/dobj/AttributeChangedEvent.java b/src/java/com/threerings/presents/dobj/AttributeChangedEvent.java index e988ba5f4..eaaee77b2 100644 --- a/src/java/com/threerings/presents/dobj/AttributeChangedEvent.java +++ b/src/java/com/threerings/presents/dobj/AttributeChangedEvent.java @@ -61,6 +61,15 @@ public class AttributeChangedEvent extends NamedEvent return _oldValue; } + /** + * Returns the new value of the attribute as a byte. This will fail + * if the attribute in question is not a byte. + */ + public byte getByteValue () + { + return ((Byte)_value).byteValue(); + } + /** * Returns the new value of the attribute as a short. This will fail * if the attribute in question is not a short.