ezvcard.parameter
Class SoundType

java.lang.Object
  extended by ezvcard.parameter.VCardParameter
      extended by ezvcard.parameter.MediaTypeParameter
          extended by ezvcard.parameter.SoundType

public class SoundType
extends MediaTypeParameter

Represents the TYPE parameter of the Sound property.

Supported versions: 2.1, 3.0, 4.0

Author:
George El-Haddad Mar 10, 2010, Michael Angstadt

Field Summary
static SoundType AAC
           
static SoundType MIDI
           
static SoundType MP3
           
static SoundType MPEG
           
static SoundType OGG
           
static SoundType WAV
           
 
Fields inherited from class ezvcard.parameter.MediaTypeParameter
extension, mediaType
 
Fields inherited from class ezvcard.parameter.VCardParameter
value
 
Method Summary
static Collection<SoundType> all()
          Gets all of the parameter values that are defined as static constants in this class.
static SoundType find(String type, String mediaType, String extension)
          Searches for a parameter value that is defined as a static constant in this class.
static SoundType get(String type, String mediaType, String extension)
          Searches for a parameter value and creates one if it cannot be found.
 
Methods inherited from class ezvcard.parameter.MediaTypeParameter
equals, getExtension, getMediaType, hashCode
 
Methods inherited from class ezvcard.parameter.VCardParameter
getValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AAC

public static final SoundType AAC

MIDI

public static final SoundType MIDI

MP3

public static final SoundType MP3

MPEG

public static final SoundType MPEG

OGG

public static final SoundType OGG

WAV

public static final SoundType WAV
Method Detail

find

public static SoundType find(String type,
                             String mediaType,
                             String extension)
Searches for a parameter value that is defined as a static constant in this class.

Parameters:
type - the TYPE parameter value to search for (e.g. "MP3") or null to not search by this value
mediaType - the media type to search for (e.g. "audio/mp3") or null to not search by this value
extension - the file extension to search for (excluding the ".", e.g. "mp3") or null to not search by this value
Returns:
the object or null if not found

get

public static SoundType get(String type,
                            String mediaType,
                            String extension)
Searches for a parameter value and creates one if it cannot be found. All objects are guaranteed to be unique, so they can be compared with == equality.

Parameters:
type - the TYPE parameter value to search for (e.g. "MP3") or null to not search by this value
mediaType - the media type to search for (e.g. "audio/mp3") or null to not search by this value
extension - the file extension to search for (excluding the ".", e.g. "mp3") or null to not search by this value
Returns:
the object

all

public static Collection<SoundType> all()
Gets all of the parameter values that are defined as static constants in this class.

Returns:
the parameter values


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.