org.n52.security.common.attributes
Class AttributeUtil

java.lang.Object
  extended by org.n52.security.common.attributes.AttributeUtil

public final class AttributeUtil
extends java.lang.Object

Class AttributeUtil is a small utility class wich shall encapsulate simple methods for easier life with attribute processing.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 05.08.2008

Method Summary
static java.util.Map fillAttributeMap(java.util.Collection attributes)
          Converts a collection of Attributes to a Map.
static java.util.Map fillAttributeMap(java.util.Map out, java.util.Collection attributes)
          Converts a collection of Attributes to a Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fillAttributeMap

public static java.util.Map fillAttributeMap(java.util.Collection attributes)
                                      throws java.lang.IllegalArgumentException
Converts a collection of Attributes to a Map.

Parameters:
attributes - a collection of Attributes
Returns:
a Map with the Attributes indexed by their keys.
Throws:
java.lang.IllegalArgumentException - if an object in attributes is not a subclass of Attribute.

fillAttributeMap

public static java.util.Map fillAttributeMap(java.util.Map out,
                                             java.util.Collection attributes)
                                      throws java.lang.IllegalArgumentException
Converts a collection of Attributes to a Map.

Parameters:
out - the outcomming map, if null a new map is constructed.
attributes - a collection of Attributes
Returns:
a Map with the Attributes indexed by their keys.
Throws:
java.lang.IllegalArgumentException - if an object in attributes is not a subclass of Attribute.


Copyright © 2004-2009 52north.org. All Rights Reserved.