org.qtunes.db
Class DerivedField<T>

java.lang.Object
  extended by org.qtunes.db.DerivedField<T>
All Implemented Interfaces:
AbstractField<T>

public abstract class DerivedField<T>
extends java.lang.Object
implements AbstractField<T>

A DerivedField is a field derived from other properties of the Track. These are mainly used for Services that need them, eg the DaapServer creates a few in the DaapField class


Constructor Summary
DerivedField(java.lang.String name)
           
 
Method Summary
abstract  T get(Track track)
           
 java.lang.String getName()
          Return the name of the field, eg "Artist"
 boolean isCacheable()
          Can this derived value be cached, or will it change over time?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DerivedField

public DerivedField(java.lang.String name)
Method Detail

get

public abstract T get(Track track)

isCacheable

public boolean isCacheable()
Can this derived value be cached, or will it change over time?


getName

public java.lang.String getName()
Description copied from interface: AbstractField
Return the name of the field, eg "Artist"

Specified by:
getName in interface AbstractField<T>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object