@Immutable public class Volume extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Volume.VolumeBuilder
A builder class for building
Volume instances. |
static class |
Volume.VolumeControlType
Describes types of volume control.
|
| Modifier and Type | Field and Description |
|---|---|
protected Volume.VolumeControlType |
controlType
The type of volume control that is available
|
protected Double |
level
The current volume level as a value between
0.0 and 1.0. |
protected Boolean |
muted
Whether the receiver is muted, independent of the volume level
|
protected Double |
stepInterval
The allowed steps for changing volume
|
| Constructor and Description |
|---|
Volume(Volume.VolumeControlType controlType,
Double level,
Boolean muted,
Double stepInterval)
Creates a new instance using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Volume.VolumeControlType |
getControlType() |
Double |
getLevel() |
Boolean |
getMuted() |
Double |
getStepInterval() |
int |
hashCode() |
Volume.VolumeBuilder |
modify()
Creates a new
Volume.VolumeBuilder that is initialized with the values
from this Volume instance, which can be modified and then used to
create a new (immutable) Volume instance. |
String |
toString() |
@Nullable protected final Volume.VolumeControlType controlType
@Nullable protected final Double level
0.0 and 1.0.
1.0 is the maximum volume possible on the receiver or stream.@Nullable protected final Boolean muted
public Volume(@Nullable Volume.VolumeControlType controlType, @Nullable Double level, @Nullable Boolean muted, @Nullable Double stepInterval)
controlType - the type of volume control that is available.level - the current volume level as a value between 0.0 and
1.0.muted - whether the receiver is muted, independent of the volume
level.stepInterval - the allowed steps for changing volume.@Nullable public Volume.VolumeControlType getControlType()
@Nullable public Double getLevel()
0.0 and
1.0.@Nullable public Boolean getMuted()
@Nullable public Double getStepInterval()
@Nonnull public Volume.VolumeBuilder modify()
Volume.VolumeBuilder that is initialized with the values
from this Volume instance, which can be modified and then used to
create a new (immutable) Volume instance.Volume.VolumeBuilder.Copyright © 2022. All rights reserved.