edu.internet2.middleware.shibboleth.common.attribute
Class BaseAttribute<ValueType>

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<ValueType>
Type Parameters:
ValueType - the object type of the values for this attribute
All Implemented Interfaces:
Comparable<BaseAttribute>
Direct Known Subclasses:
BasicAttribute

public abstract class BaseAttribute<ValueType>
extends Object
implements Comparable<BaseAttribute>

A resolved attribute.


Field Summary
private  Map<Locale,String> displayDescriptions
          Localized human readable description of attribute.
private  Map<Locale,String> displayNames
          Localized human intelligible attribute name.
 
Constructor Summary
protected BaseAttribute()
          Constructor.
 
Method Summary
 int compareTo(BaseAttribute o)
          
 boolean equals(Object obj)
          
 Map<Locale,String> getDisplayDescriptions()
          Gets the localized human readable description of attribute.
 Map<Locale,String> getDisplayNames()
          Gets the localized human readable name of the attribute.
abstract  List<AttributeEncoder> getEncoders()
          Gets the list of attribute encoders usable with this attribute.
abstract  String getId()
          Gets the unique ID of the attribute.
abstract  Comparator<ValueType> getValueComparator()
          Gets the comparator used to sort values.
abstract  Collection<ValueType> getValues()
          Gets the values of the attribute.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

displayNames

private Map<Locale,String> displayNames
Localized human intelligible attribute name.


displayDescriptions

private Map<Locale,String> displayDescriptions
Localized human readable description of attribute.

Constructor Detail

BaseAttribute

protected BaseAttribute()
Constructor.

Method Detail

getDisplayDescriptions

public Map<Locale,String> getDisplayDescriptions()
Gets the localized human readable description of attribute.

Returns:
human readable description of attribute

getDisplayNames

public Map<Locale,String> getDisplayNames()
Gets the localized human readable name of the attribute.

Returns:
human readable name of the attribute

getEncoders

public abstract List<AttributeEncoder> getEncoders()
Gets the list of attribute encoders usable with this attribute.

Returns:
attribute encoders usable with this attribute, must never be null

getId

public abstract String getId()
Gets the unique ID of the attribute.

Returns:
unique ID of the attribute

getValueComparator

public abstract Comparator<ValueType> getValueComparator()
Gets the comparator used to sort values. If no comparator is set then the value set with be natural ordering sorted.

Returns:
comparator used to sort values

getValues

public abstract Collection<ValueType> getValues()
Gets the values of the attribute.

Returns:
values of the attribute, must never be null

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

compareTo

public int compareTo(BaseAttribute o)

Specified by:
compareTo in interface Comparable<BaseAttribute>

toString

public String toString()

Overrides:
toString in class Object


Copyright © 1999-2012. All Rights Reserved.