Package org.jupnp.support.model.dlna
Klasse DLNAAttribute<T>
java.lang.Object
org.jupnp.support.model.dlna.DLNAAttribute<T>
- Bekannte direkte Unterklassen:
DLNAConversionIndicatorAttribute,DLNAFlagsAttribute,DLNAOperationsAttribute,DLNAPlaySpeedAttribute,DLNAProfileAttribute
Transforms known and standardized DLNA attributes from/to string representation.
The newInstance(org.jupnp.support.model.dlna.DLNAAttribute.Type, String, String)
method attempts to instantiate the best header subtype for a given header (name) and string value.
- Autor:
- Christian Bauer, Mario Franco, Amit Kumar Mondal - Code Refactoring
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumMaps a standardized DLNA attribute to potential attribute subtypes. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract StringgetValue()static DLNAAttribute<?> newInstance(DLNAAttribute.Type type, String attributeValue, String contentFormat) Create a new instance of aDLNAAttributesubtype that matches the given type and value.abstract voidvoidtoString()
-
Konstruktordetails
-
DLNAAttribute
public DLNAAttribute()
-
-
Methodendetails
-
setValue
-
getValue
-
setString
- Parameter:
s- This attribute's value as a string representation.cf- This attribute's mime type as a string representation, optional.- Löst aus:
InvalidDLNAProtocolAttributeException- If the value is invalid for this DLNA attribute.
-
getString
- Gibt zurück:
- A string representing this attribute's value.
-
newInstance
public static DLNAAttribute<?> newInstance(DLNAAttribute.Type type, String attributeValue, String contentFormat) Create a new instance of aDLNAAttributesubtype that matches the given type and value.This method iterates through all potential attribute subtype classes as declared in
DLNAAttribute.Type. It creates a new instance of the subtype class and calls itssetString(String, String)method. If noInvalidDLNAProtocolAttributeExceptionis thrown, the subtype instance is returned.- Parameter:
type- The type of the attribute.attributeValue- The value of the attribute.contentFormat- The DLNA mime type of the attribute, optional.- Gibt zurück:
- The best matching attribute subtype instance, or
nullif no subtype can be found.
-
toString
-