PropertyCollection Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. PropertyCollection
- com.
Implements
public class PropertyCollection
implements java.lang.AutoCloseable
Represents collection of properties and their values. Note: close() must be called in order to release underlying resources held by the object.
Constructor Summary
Constructor | Description |
---|---|
PropertyCollection(IntRef propHandle) |
Creates a new instance or Property |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Dispose of the associated parameter value collection. |
java.lang.String |
getProperty(PropertyId id)
Gets the property's value by its id |
java.lang.String |
getProperty(String name)
Returns the property value. |
java.lang.String |
getProperty(String name, String defaultValue)
Returns the property value. |
void |
setProperty(PropertyId id, String value)
Sets the property's value by id |
void |
setProperty(String name, String value)
Sets the property value by name |
Methods inherited from java.lang.Object
Constructor Details
PropertyCollection
public PropertyCollection(IntRef propHandle)
Creates a new instance or PropertyCollection using the provided native handle.
Parameters:
Method Details
close
public void close()
Dispose of the associated parameter value collection.
getProperty
public String getProperty(PropertyId id)
Gets the property's value by its id
Parameters:
Returns:
getProperty
public String getProperty(String name)
Returns the property value. If the name is not available, it returns an empty String.
Parameters:
Returns:
getProperty
public String getProperty(String name, String defaultValue)
Returns the property value. If the name is not available, it returns a default value.
Parameters:
Returns:
setProperty
public void setProperty(PropertyId id, String value)
Sets the property's value by id
Parameters:
setProperty
public void setProperty(String name, String value)
Sets the property value by name
Parameters:
Applies to
Azure SDK for Java