From 2b9c7ce7e2a08464e412be2841f00f6524cef437 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Wed, 7 May 2014 17:09:45 +0200 Subject: Reimplement Inventory (ItemList) --- src/net/pacien/util/IntrinsicMap.java | 10 +++------- src/net/pacien/util/Mappable.java | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/net') diff --git a/src/net/pacien/util/IntrinsicMap.java b/src/net/pacien/util/IntrinsicMap.java index fe59ac2..c09965d 100644 --- a/src/net/pacien/util/IntrinsicMap.java +++ b/src/net/pacien/util/IntrinsicMap.java @@ -1,6 +1,3 @@ -/** - * - */ package net.pacien.util; import java.util.Collection; @@ -11,12 +8,12 @@ import java.util.Map; * @author pacien * */ -public class IntrinsicMap extends HashMap { +public class IntrinsicMap> extends HashMap { /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 804991277001317260L; /** * @@ -47,9 +44,8 @@ public class IntrinsicMap extends HashMap { super(initialCapacity, loadFactor); } - @SuppressWarnings("unchecked") public V put(final V value) { - return super.put((K) value.getKey(), value); + return super.put(value.getKey(), value); } @Override diff --git a/src/net/pacien/util/Mappable.java b/src/net/pacien/util/Mappable.java index b5bbf06..804a275 100644 --- a/src/net/pacien/util/Mappable.java +++ b/src/net/pacien/util/Mappable.java @@ -1,7 +1,7 @@ package net.pacien.util; -public interface Mappable { +public interface Mappable { - public Object getKey(); + public K getKey(); } -- cgit v1.2.3