com.tractrac.clientmodule.details
Class Attachments

java.lang.Object
  extended by com.tractrac.clientmodule.details.Attachments
Direct Known Subclasses:
IdBase, RaceCompetitor, TimeObject

public class Attachments
extends java.lang.Object

Base class used for objects that can attach custom data.

Version:
2.0
Author:
TracTrac

Constructor Summary
Attachments()
           
 
Method Summary
<T> T
getAttachment(AttKey key)
          Fetches custom data for this object.
 void setAttachment(AttKey key, java.lang.Object obj)
          Sets custom data for this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attachments

public Attachments()
Method Detail

getAttachment

public <T> T getAttachment(AttKey key)
Fetches custom data for this object.

Parameters:
key - the attachment key.
Returns:
custom data for this object.

setAttachment

public void setAttachment(AttKey key,
                          java.lang.Object obj)
Sets custom data for this object. Previous data for this attachment key, if any, are overwritten.

Parameters:
key - the attachment key.
obj - the custom data to attach.