sk.baka.ambient.collection
Enum TrackOriginEnum

java.lang.Object
  extended by java.lang.Enum<TrackOriginEnum>
      extended by sk.baka.ambient.collection.TrackOriginEnum
All Implemented Interfaces:
Serializable, Comparable<TrackOriginEnum>

public enum TrackOriginEnum
extends Enum<TrackOriginEnum>

The location of the track.

Author:
Martin Vysny

Enum Constant Summary
Ampache
          Ampache music library.
LocalFs
          The local filesystem.
Magnatune
          Magnatune shop.
Shoutcast
          A SHOUTcast radio station.
SkreemR
          SkreemR search engine.
 
Field Summary
 boolean endless
          If true then this stream type is endless (like an Internet radio).
 boolean online
          If true then tracks from this location are stored on-line.
 boolean seekable
          If true then media player is able to seek in this media type.
 String url
          The track location URL.
 
Method Summary
static TrackOriginEnum fromDb(int val)
          Gets the enum constant from a DB INT value.
static TrackOriginEnum fromLocation(String location)
          Gets the track type from its location.
 String toDBString()
          Returns the enum value as a database string.
static TrackOriginEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TrackOriginEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LocalFs

public static final TrackOriginEnum LocalFs
The local filesystem.


Magnatune

public static final TrackOriginEnum Magnatune
Magnatune shop.


SkreemR

public static final TrackOriginEnum SkreemR
SkreemR search engine.


Shoutcast

public static final TrackOriginEnum Shoutcast
A SHOUTcast radio station.


Ampache

public static final TrackOriginEnum Ampache
Ampache music library.

Field Detail

endless

public final boolean endless
If true then this stream type is endless (like an Internet radio). If false then the stream type is a finite file.


seekable

public final boolean seekable
If true then media player is able to seek in this media type.


url

public final String url
The track location URL. May be null if there is no particular URL.


online

public final boolean online
If true then tracks from this location are stored on-line.

Method Detail

values

public static TrackOriginEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TrackOriginEnum c : TrackOriginEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TrackOriginEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromDb

public static TrackOriginEnum fromDb(int val)
Gets the enum constant from a DB INT value.

Parameters:
val - the value
Returns:
the constant.

fromLocation

public static TrackOriginEnum fromLocation(String location)
Gets the track type from its location.

Parameters:
location - the location.
Returns:
the constant.

toDBString

public String toDBString()
Returns the enum value as a database string. This string is passable for example to the ICollection finder method.

Returns:
a DB representation of this enum.


Copyright © 2007-2008. All Rights Reserved.