From 6ab0c7c95e0d164bdf10ae2d34669bd01b83546f Mon Sep 17 00:00:00 2001 From: Dave Hoover Date: Tue, 15 Dec 2009 23:56:39 +0000 Subject: [PATCH] As Charlie points out, that makes more sense being abstract. Shame on me for copying NamedSetAdapter on autopilot; there you have multiple things that you might not want to bother with, but here you damned well BETTER implement that one method yourself. Also, while I'm at it, make that protected since I really doubt you're going to find yourself sitting on top of an EntryAddedEvent that you're REALLY SURE is the right one & want to pass it in to one of these by hand. And if you do, suck it up and let the string compare burn the couple extra cycles to make sure. (I feel like making the same change to the other Named* things here real quick, but I should really double check that I don't break anybody's stuff/change anything I see using it that would now be making the named versions more visible for now good reason) git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6004 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/dobj/NamedElementUpdateListener.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/presents/dobj/NamedElementUpdateListener.java b/src/java/com/threerings/presents/dobj/NamedElementUpdateListener.java index 160d1857b..f1db58608 100644 --- a/src/java/com/threerings/presents/dobj/NamedElementUpdateListener.java +++ b/src/java/com/threerings/presents/dobj/NamedElementUpdateListener.java @@ -25,7 +25,7 @@ package com.threerings.presents.dobj; * An ElementUpdateListener that listens for changes with a given name and calls * namedElementUpdated when they occur. */ -public class NamedElementUpdateListener +public abstract class NamedElementUpdateListener implements ElementUpdateListener { /** @@ -43,10 +43,7 @@ public class NamedElementUpdateListener } } - public void namedElementUpdated (ElementUpdatedEvent event) - { - // Override to provide functionality - } + abstract protected void namedElementUpdated (ElementUpdatedEvent event); protected final String _name; }