java.lang.Object
io.github.zeroone3010.yahueapi.v2.domain.update.TimedEffects

public class TimedEffects
extends Object
  • Constructor Details

  • Method Details

    • getEffect

      public TimedEffectType getEffect()
    • setEffect

      public TimedEffects setEffect​(TimedEffectType effect)
      Sets a timed effect, or clears it with TimedEffectType.NO_EFFECT.
      Parameters:
      effect - A TimedEffectType.
      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

      public TimedEffects setDuration​(Duration duration)
      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

      public String toString()
      Overrides:
      toString in class Object