Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.util
Class TypeMap<K,V>

java.lang.Object
  extended by oracle.javatools.util.TypeMap<K,V>


public class TypeMap<K,V>
extends java.lang.Object

A map from a type and all its subtypes to a value.


Constructor Summary
TypeMap()
          Creates a type map in which the keys match both subclasses and subinterfaces.

 

Method Summary
 void clear()
          Clears the map.
 boolean containsKey(java.lang.Class<? extends K> key)
          Gets the value corresponding to a type key, or null if none.
 V get(java.lang.Class<? extends K> key)
          Gets the value corresponding to a type, or null if none.
 boolean isEmpty()
          Gets whether the map has any entries.
 java.util.Set<java.lang.Class<? extends K>> keySet()
           
 V put(java.lang.Class<? extends K> key, V value)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TypeMap

public TypeMap()
Creates a type map in which the keys match both subclasses and subinterfaces.

Method Detail

clear

public void clear()
Clears the map.

isEmpty

public boolean isEmpty()
Gets whether the map has any entries.

containsKey

public boolean containsKey(java.lang.Class<? extends K> key)
Gets the value corresponding to a type key, or null if none. If no value for the type is present, gets the value for the closest superinterface or superclass of the type, if any.

get

public V get(java.lang.Class<? extends K> key)
Gets the value corresponding to a type, or null if none. If no value for the type is present, gets the value for the closest superinterface or superclass of the type, if any.

put

public V put(java.lang.Class<? extends K> key,
             V value)

keySet

public java.util.Set<java.lang.Class<? extends K>> keySet()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.