jebl.util
Interface Attributable

All Known Subinterfaces:
Edge, Graph, Node, RootedTree, Sequence, Tree
All Known Implementing Classes:
AttributableHelper, BasicSequence, CompactRootedTree, ConsensusSequence, FilteredRootedTree, FilteredSequence, GaplessSequence, MutableRootedTree, RootedFromUnrooted, SimpleRootedTree, SimpleTree, SortedRootedTree, Taxon, TransformedRootedTree, TranslatedSequence

public interface Attributable

Interface for associating attributeNames with an object.

Author:
Andrew Rambaut

Nested Class Summary
static class Attributable.Utils
           
 
Method Summary
 Object getAttribute(String name)
           
 Map<String,Object> getAttributeMap()
          Gets the entire attribute map.
 Set<String> getAttributeNames()
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
          Sets an named attribute for this object.
 

Method Detail

setAttribute

void setAttribute(String name,
                  Object value)
Sets an named attribute for this object.

Parameters:
name - the name of the attribute.
value - the new value of the attribute.

getAttribute

Object getAttribute(String name)
Parameters:
name - the name of the attribute of interest.
Returns:
an object representing the named attributed for this object.

removeAttribute

void removeAttribute(String name)
Parameters:
name - name of attribute to remove

getAttributeNames

Set<String> getAttributeNames()
Returns:
an array of the attributeNames that this object has.

getAttributeMap

Map<String,Object> getAttributeMap()
Gets the entire attribute map.

Returns:
an unmodifiable map