com.vinculumtech.platform.util
Class TypeMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended bycom.vinculumtech.platform.util.TypeMap
All Implemented Interfaces:
java.util.Map

public class TypeMap
extends java.util.AbstractMap

TypeMap holds a set of Class/Object pairs. The Class instances are sorted from narrow to wide.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/platform/util/TypeMap.java#4 $
Author:
Dan Walters

Nested Class Summary
static class TypeMap.Entry
           
protected  class TypeMap.TypeEntryIterator
           
protected  class TypeMap.TypeEntrySet
           
 
Constructor Summary
TypeMap()
           
TypeMap(java.util.Map map)
           
 
Method Summary
 void clear()
           
 boolean containsAssignableKey(java.lang.Class key)
           
 java.util.Set entrySet()
           
 java.lang.Object getAssignable(java.lang.Class key)
           
 TypeMap.Entry getFirstEntry()
          Returns the more narrow entry
 TypeMap.Entry getLastEntry()
          Returns the most wide entry
protected  void insertEntryBetween(TypeMap.Entry entry, TypeMap.Entry previousEntry, TypeMap.Entry nextEntry)
           
 java.lang.Object put(java.lang.Class key, java.lang.Object value)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap()

TypeMap

public TypeMap(java.util.Map map)
Method Detail

entrySet

public java.util.Set entrySet()

getAssignable

public java.lang.Object getAssignable(java.lang.Class key)

containsAssignableKey

public boolean containsAssignableKey(java.lang.Class key)

insertEntryBetween

protected void insertEntryBetween(TypeMap.Entry entry,
                                  TypeMap.Entry previousEntry,
                                  TypeMap.Entry nextEntry)

put

public java.lang.Object put(java.lang.Class key,
                            java.lang.Object value)

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)

clear

public void clear()

getFirstEntry

public TypeMap.Entry getFirstEntry()
Returns the more narrow entry

Returns:

getLastEntry

public TypeMap.Entry getLastEntry()
Returns the most wide entry

Returns:


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.