ezvcard.parameter
Class MediaTypeParameter

java.lang.Object
  extended by ezvcard.parameter.VCardParameter
      extended by ezvcard.parameter.MediaTypeParameter
Direct Known Subclasses:
ImageType, KeyType, SoundType

public class MediaTypeParameter
extends VCardParameter

Represents a TYPE parameter that also has a media type associated with it. The TYPE parameter value is used in 2.1 and 3.0 vCards, while the media type value is used in 4.0 vCards.

Author:
Michael Angstadt

Field Summary
protected  String extension
           
protected  String mediaType
           
 
Fields inherited from class ezvcard.parameter.VCardParameter
value
 
Constructor Summary
MediaTypeParameter(String value, String mediaType, String extension)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getExtension()
          Gets the file extension.
 String getMediaType()
          Gets the media type.
 int 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

mediaType

protected final String mediaType

extension

protected final String extension
Constructor Detail

MediaTypeParameter

public MediaTypeParameter(String value,
                          String mediaType,
                          String extension)
Parameters:
value - the TYPE parameter value (e.g. "JPEG")
mediaType - the media type (e.g. "image/jpeg")
extension - the file extension (e.g. "jpg")
Method Detail

getMediaType

public String getMediaType()
Gets the media type.

Returns:
the media type (e.g. "image/jpeg")

getExtension

public String getExtension()
Gets the file extension.

Returns:
the file extension (e.g. "jpg")

hashCode

public int hashCode()
Overrides:
hashCode in class VCardParameter

equals

public boolean equals(Object obj)
Overrides:
equals in class VCardParameter


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