Class NewLightsResult

java.lang.Object
io.github.zeroone3010.yahueapi.NewLightsResult

public final class NewLightsResult
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    NewLightsResult​(java.util.Collection<Light> newLights, NewLightsSearchStatus status, java.time.ZonedDateTime lastSearchTime)  
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<java.time.ZonedDateTime> getLastSearchTime()
    Time of the last finished search, or Optional.empty() if no search has been completed since the last time the Bridge was rebooted.
    java.util.Collection<Light> getNewLights()
    The lights that were found the last time new lights were searched for, if any.
    NewLightsSearchStatus getStatus()
    Status of searching for new lights: ACTIVE if there is a search currently going on, [@code NONE} if no search has been performed since the Bridge was last rebooted, and COMPLETED if a search has been finished.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getNewLights

      public java.util.Collection<Light> getNewLights()
      The lights that were found the last time new lights were searched for, if any.
      Returns:
      A collection of lights found the last time new lights were searched for.
    • getStatus

      public NewLightsSearchStatus getStatus()
      Status of searching for new lights: ACTIVE if there is a search currently going on, [@code NONE} if no search has been performed since the Bridge was last rebooted, and COMPLETED if a search has been finished. In the case of a COMPLETED search, see getLastSearchTime() for the time when the search was finished.
      Returns:
      Status of searching for new lights.
    • getLastSearchTime

      public java.util.Optional<java.time.ZonedDateTime> getLastSearchTime()
      Time of the last finished search, or Optional.empty() if no search has been completed since the last time the Bridge was rebooted.
      Returns:
      The time when the last search was finished, if one has been finished.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object