JBoss Metadata Common 7.0.4.Final-redhat-1

org.jboss.metadata.javaee.support
Class AbstractMappedMetaData<T extends MappableMetaData>

java.lang.Object
  extended by org.jboss.metadata.javaee.support.IdMetaDataImpl
      extended by org.jboss.metadata.javaee.support.AbstractMappedMetaData<T>
Type Parameters:
T - the metadata type
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, IdMetaData, MappedMetaData<T>
Direct Known Subclasses:
AbstractMappedMetaDataWithOverride, AnnotatedEJBReferencesMetaData, AnnotationPropertiesMetaData, AnnotationsMetaData, DataSourcesMetaData, EJBLocalReferencesMetaData, EJBReferencesMetaData, EnvironmentEntriesMetaData, JndiRefsMetaData, MessageDestinationReferencesMetaData, MessageDestinationsMetaData, PersistenceContextReferencesMetaData, PersistenceUnitReferencesMetaData, PropertiesMetaData, ResourceEnvironmentReferencesMetaData, ResourceReferencesMetaData, SecurityRoleRefsMetaData, SecurityRolesMetaData, ServiceReferenceHandlersMetaData, ServiceReferencesMetaData, WebserviceDescriptionsMetaData

public abstract class AbstractMappedMetaData<T extends MappableMetaData>
extends IdMetaDataImpl
implements MappedMetaData<T>

MappedMetaData.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
protected AbstractMappedMetaData(String keyName)
          Create a new MappedMetaData.
 
Method Summary
 boolean add(T o)
           
 boolean addAll(Collection<? extends T> c)
           
protected  void addNotification(T added)
          Notification that something was added
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean containsKey(String key)
          Returns true if this mapped meta data contains a meta data entry for the specified key.
 boolean equals(Object obj)
           
 T get(String key)
          Get the metadata for the given key
static
<T extends MappableMetaData>
T
getByName(String name, MappedMetaData<T> map)
          Get By Name
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 Set<String> keySet()
          Get the key set
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
protected  void removeNotification(T removed)
          Notification that something was removed
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<X> X[]
toArray(X[] a)
           
 String toString()
           
 
Methods inherited from class org.jboss.metadata.javaee.support.IdMetaDataImpl
clone, getId, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.metadata.javaee.support.IdMetaData
getId, setId
 

Constructor Detail

AbstractMappedMetaData

protected AbstractMappedMetaData(String keyName)
Create a new MappedMetaData.

Parameters:
keyName - the key name
Method Detail

getByName

public static <T extends MappableMetaData> T getByName(String name,
                                                       MappedMetaData<T> map)
Get By Name

Type Parameters:
T - the type
Parameters:
name - the name
map - the map
Returns:
the result

containsKey

public boolean containsKey(String key)
Description copied from interface: MappedMetaData
Returns true if this mapped meta data contains a meta data entry for the specified key.

Specified by:
containsKey in interface MappedMetaData<T extends MappableMetaData>
Parameters:
key - the key of the mappable meta data
Returns:
true if the key can be found

keySet

public Set<String> keySet()
Get the key set

Specified by:
keySet in interface MappedMetaData<T extends MappableMetaData>
Returns:
the key set

get

public T get(String key)
Get the metadata for the given key

Specified by:
get in interface MappedMetaData<T extends MappableMetaData>
Parameters:
key - the key
Returns:
the key
Throws:
IllegalArgumentException - for a null key

add

public boolean add(T o)
Specified by:
add in interface Collection<T extends MappableMetaData>

clear

public void clear()
Specified by:
clear in interface Collection<T extends MappableMetaData>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<T extends MappableMetaData>

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T extends MappableMetaData>
Specified by:
iterator in interface Collection<T extends MappableMetaData>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<T extends MappableMetaData>

size

public int size()
Specified by:
size in interface Collection<T extends MappableMetaData>

addAll

public boolean addAll(Collection<? extends T> c)
Specified by:
addAll in interface Collection<T extends MappableMetaData>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<T extends MappableMetaData>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T extends MappableMetaData>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<T extends MappableMetaData>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<T extends MappableMetaData>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<T extends MappableMetaData>

toArray

public <X> X[] toArray(X[] a)
Specified by:
toArray in interface Collection<T extends MappableMetaData>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<T extends MappableMetaData>
Overrides:
equals in class IdMetaDataImpl

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<T extends MappableMetaData>
Overrides:
hashCode in class IdMetaDataImpl

toString

public String toString()
Overrides:
toString in class Object

addNotification

protected void addNotification(T added)
Notification that something was added

Parameters:
added - the thing added

removeNotification

protected void removeNotification(T removed)
Notification that something was removed

Parameters:
removed - the thing removed

JBoss Metadata Common 7.0.4.Final-redhat-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.