Class Duration


  • @Embeddable
    @VoDml(ref="ivoa:duration",
           type=primitiveType)
    public class Duration
    extends java.lang.Object
    UML PrimitiveType duration : Represents an interval of time from beginning to end. Is not equivalent to a simple real value indicating the number of seconds (for example). In general a custom mapping to a particular serialisation context must be provided.
    • Constructor Summary

      Constructors 
      Constructor Description
      Duration()  
      Duration​(java.util.Date from, java.util.Date to)
      Creates a new duration Primitive Type instance, wrapping a base type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getFrom()  
      java.util.Date getTo()  
      void setFrom​(java.util.Date from)  
      void setTo​(java.util.Date to)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Duration

        public Duration​(java.util.Date from,
                        java.util.Date to)
        Creates a new duration Primitive Type instance, wrapping a base type.
        Parameters:
        from - the start of the duration
        to - the end of the duration
      • Duration

        public Duration()
    • Method Detail

      • getFrom

        public java.util.Date getFrom()
      • setFrom

        public void setFrom​(java.util.Date from)
      • getTo

        public java.util.Date getTo()
      • setTo

        public void setTo​(java.util.Date to)