Class Scene

java.lang.Object
com.castlabs.sdk.viisights.Scene
All Implemented Interfaces:
Comparable<Scene>

public class Scene extends Object implements Comparable<Scene>
Represents a scene in the Viisight system, defined by its start and end times,
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Category[]
    Array of categories associated with the scene.
    final ContentClass[]
    Array of content classes associated with the scene.
    final long
    End time of the scene in milliseconds.
    final long
    Start time of the scene in milliseconds.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Scene(long startMs, long endMs, ContentClass[] contentClasses, Category[] categories)
    Constructs a Scene object with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(Scene another)
     
    boolean
    isVisible(long positionMs)
    Checks if the scene is visible at a given position in milliseconds.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • startMs

      public final long startMs
      Start time of the scene in milliseconds.
    • endMs

      public final long endMs
      End time of the scene in milliseconds.
    • contentClasses

      public final ContentClass[] contentClasses
      Array of content classes associated with the scene.
    • categories

      public final Category[] categories
      Array of categories associated with the scene.
  • Constructor Details

    • Scene

      public Scene(long startMs, long endMs, ContentClass[] contentClasses, Category[] categories)
      Constructs a Scene object with the specified parameters.
      Parameters:
      startMs - The start time of the scene in milliseconds.
      endMs - The end time of the scene in milliseconds.
      contentClasses - An array of content classes associated with the scene.
      categories - An array of categories associated with the scene.
  • Method Details

    • isVisible

      public boolean isVisible(long positionMs)
      Checks if the scene is visible at a given position in milliseconds.
      Parameters:
      positionMs - The position in milliseconds to check for visibility.
      Returns:
      true if the scene is visible at the specified position, false otherwise.
    • compareTo

      public int compareTo(Scene another)
      Specified by:
      compareTo in interface Comparable<Scene>