org.n52.security.common.attributes
Class AttributeUtil

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

public final class AttributeUtil
extends Object

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 Map<String,Attribute> fillAttributeMap(Collection<Attribute> attributes)
          Converts a collection of Attributes to a Map.
static Map<String,Attribute> fillAttributeMap(Map<String,Attribute> out, Collection<Attribute> 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 Map<String,Attribute> fillAttributeMap(Collection<Attribute> attributes)
                                              throws 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:
IllegalArgumentException - if an object in attributes is not a subclass of Attribute.

fillAttributeMap

public static Map<String,Attribute> fillAttributeMap(Map<String,Attribute> out,
                                                     Collection<Attribute> attributes)
                                              throws 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:
IllegalArgumentException - if an object in attributes is not a subclass of Attribute.


Copyright © 2004–2014 52north.org. All rights reserved.