jebl.util
Interface Attributable

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

public interface Attributable

Interface for associating attributeNames with an object.

Version:
$Id: Attributable.java 849 2007-12-06 00:10:14Z twobeers $
Author:
Andrew Rambaut

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

Method Detail

setAttribute

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

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

getAttribute

java.lang.Object getAttribute(java.lang.String name)
Parameters:
name - the name of the attribute of interest, or null if the attribute doesn't exist.
Returns:
an object representing the named attributed for this object.

removeAttribute

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

getAttributeNames

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

getAttributeMap

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

Returns:
an unmodifiable map


http://code.google.com/p/jebl2/