From c673ab5f4e38463fe210eb141678206904f39505 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Fri, 11 Sep 2009 22:22:41 +0000 Subject: [PATCH] finish extraction of abstract class git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/branches/collections_jdk5_branch@814061 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/splitmap/TransformedMap.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/commons/collections/splitmap/TransformedMap.java b/src/java/org/apache/commons/collections/splitmap/TransformedMap.java index 88e309c41..67a515f29 100644 --- a/src/java/org/apache/commons/collections/splitmap/TransformedMap.java +++ b/src/java/org/apache/commons/collections/splitmap/TransformedMap.java @@ -66,8 +66,6 @@ public class TransformedMap extends AbstractIterableGetMapDecorator< /** Serialization version */ private static final long serialVersionUID = 5966875321133456994L; - /** The decorated map */ - private Map decorated; /** The transformer to use for the key */ private final Transformer keyTransformer; /** The transformer to use for the value */ @@ -128,7 +126,7 @@ public class TransformedMap extends AbstractIterableGetMapDecorator< */ private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); - out.writeObject(decorated); + out.writeObject(decorated()); } /** @@ -142,7 +140,7 @@ public class TransformedMap extends AbstractIterableGetMapDecorator< @SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); - decorated = (Map) in.readObject(); + map = (Map) in.readObject(); } //----------------------------------------------------------------------- @@ -216,5 +214,10 @@ public class TransformedMap extends AbstractIterableGetMapDecorator< decorated().putAll(transformMap(mapToCopy)); } - + /** + * {@inheritDoc} + */ + public void clear() { + decorated().clear(); + } }