Package one.pkg.tinyutils.sounds
Record Class VolumeControl.VolumeInfo
java.lang.Object
java.lang.Record
one.pkg.tinyutils.sounds.VolumeControl.VolumeInfo
- Enclosing class:
- VolumeControl
public static record VolumeControl.VolumeInfo(float volume, float volumeDb, float minDb, float maxDb, boolean muted)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVolumeInfo(float volume, float volumeDb, float minDb, float maxDb, boolean muted) Creates an instance of aVolumeInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmaxDb()Returns the value of themaxDbrecord component.floatminDb()Returns the value of theminDbrecord component.booleanmuted()Returns the value of themutedrecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.floatvolumeDb()Returns the value of thevolumeDbrecord component.
-
Constructor Details
-
VolumeInfo
public VolumeInfo(float volume, float volumeDb, float minDb, float maxDb, boolean muted) Creates an instance of aVolumeInforecord class.- Parameters:
volume- the value for thevolumerecord componentvolumeDb- the value for thevolumeDbrecord componentminDb- the value for theminDbrecord componentmaxDb- the value for themaxDbrecord componentmuted- the value for themutedrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
volume
public float volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
volumeDb
public float volumeDb()Returns the value of thevolumeDbrecord component.- Returns:
- the value of the
volumeDbrecord component
-
minDb
public float minDb()Returns the value of theminDbrecord component.- Returns:
- the value of the
minDbrecord component
-
maxDb
public float maxDb()Returns the value of themaxDbrecord component.- Returns:
- the value of the
maxDbrecord component
-
muted
public boolean muted()Returns the value of themutedrecord component.- Returns:
- the value of the
mutedrecord component
-