Class TimedEffects
java.lang.Object
io.github.zeroone3010.yahueapi.v2.domain.update.TimedEffects
public class TimedEffects extends Object
-
Constructor Summary
Constructors Constructor Description TimedEffects()
-
Method Summary
Modifier and Type Method Description long
getDuration()
Duration in milliseconds.TimedEffectType
getEffect()
TimedEffects
setDuration(Duration duration)
Duration of the effect.TimedEffects
setEffect(TimedEffectType effect)
Sets a timed effect, or clears it withTimedEffectType.NO_EFFECT
.String
toString()
-
Constructor Details
-
TimedEffects
public TimedEffects()
-
-
Method Details
-
getEffect
-
setEffect
Sets a timed effect, or clears it withTimedEffectType.NO_EFFECT
.- Parameters:
effect
- ATimedEffectType
.- Returns:
- Self, so that one can also use this method like a fluent builder.
-
getDuration
public long getDuration()Duration in milliseconds. Maximum of 21600000, i.e. six hours.- Returns:
- Timed effect duration in milliseconds.
-
setDuration
Duration of the effect. The Bridge decreases the resolution for larger durations. For example, effects with a duration of less than a minute will be rounded to the nearest second, whereas durations larger than an hour will be rounded to a resolution of 5 minutes. The maximum duration is 6 hours.- Parameters:
duration
- Duration of the timed effect.- Returns:
- Self, so that one can also use this method like a fluent builder.
-
toString
-