Class TimeRange.Builder

  • Enclosing class:
    TimeRange

    public static class TimeRange.Builder
    extends java.lang.Object
    Builder for TimeRange.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Date endTime  
      protected java.util.Date startTime  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Builder()  
    • Field Detail

      • startTime

        protected java.util.Date startTime
      • endTime

        protected java.util.Date endTime
    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • withStartTime

        public TimeRange.Builder withStartTime​(java.util.Date startTime)
        Set value for optional field.
        Parameters:
        startTime - Optional starting time (inclusive).
        Returns:
        this builder
      • withEndTime

        public TimeRange.Builder withEndTime​(java.util.Date endTime)
        Set value for optional field.
        Parameters:
        endTime - Optional ending time (exclusive).
        Returns:
        this builder
      • build

        public TimeRange build()
        Builds an instance of TimeRange configured with this builder's values
        Returns:
        new instance of TimeRange