Class TimestampRange

  • All Implemented Interfaces:
    java.io.Serializable

    public class TimestampRange
    extends java.lang.Object
    implements java.io.Serializable
    A restriction represented by a range of timestamps [from, to).
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      com.google.cloud.Timestamp getFrom()
      Returns the range start timestamp (inclusive).
      com.google.cloud.Timestamp getTo()
      Returns the range end timestamp (exclusive).
      int hashCode()  
      static TimestampRange of​(com.google.cloud.Timestamp from, com.google.cloud.Timestamp to)
      Constructs a timestamp range.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • of

        public static TimestampRange of​(com.google.cloud.Timestamp from,
                                        com.google.cloud.Timestamp to)
        Constructs a timestamp range. The range represents a closed-open interval [from, to). The timestamp to must be greater or equal to the timestamp from, otherwise an IllegalArgumentException will be thrown.
      • getFrom

        public com.google.cloud.Timestamp getFrom()
        Returns the range start timestamp (inclusive).
      • getTo

        public com.google.cloud.Timestamp getTo()
        Returns the range end timestamp (exclusive).
      • toString

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

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object