From 7d5d10e2f8b0c08834600ae866d153788f67e8e9 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 28 Oct 2008 20:40:35 +0000 Subject: [PATCH] Ray wants size() and I don't want mutators. I'll compromise and return an immutable list. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5479 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/dobj/DObject.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/presents/dobj/DObject.java b/src/java/com/threerings/presents/dobj/DObject.java index 2c8c6b476..108088bc7 100644 --- a/src/java/com/threerings/presents/dobj/DObject.java +++ b/src/java/com/threerings/presents/dobj/DObject.java @@ -25,8 +25,10 @@ import java.lang.reflect.Field; import java.util.Arrays; import java.util.Comparator; +import java.util.List; import java.util.Map; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import com.samskivert.util.ArrayUtil; @@ -670,11 +672,11 @@ public class DObject } /** - * Returns an enumeration over our local attributes. + * Returns an array containing our local attributes. */ - public Iterable getLocals () + public List getLocals () { - return Arrays.asList(_locattrs); + return ImmutableList.of(_locattrs); } /**