Class Duration


  • public class Duration
    extends AbstractXJdfType<java.lang.String,​Duration>
    Durations are a component of time intervals and define the amount of intervening time in a time interval. Durations are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S
    • Constructor Summary

      Constructors 
      Constructor Description
      Duration()
      Default constructor.
      Duration​(int day)
      Custom constructor.
      Duration​(int day, int hour)
      Custom constructor.
      Duration​(int year, int month, int day, int hour, int minute, int second)
      Custom constructor.
      Duration​(java.lang.String expression)
      Custom constructor.
    • Constructor Detail

      • Duration

        public Duration()
        Default constructor.
      • Duration

        public Duration​(int day)
        Custom constructor. Accepting a value for day.
      • Duration

        public Duration​(int day,
                        int hour)
        Custom constructor. Accepting values for day and hour.
      • Duration

        public Duration​(java.lang.String expression)
        Custom constructor. Accepting accepting a String expression for initializing..
      • Duration

        public Duration​(int year,
                        int month,
                        int day,
                        int hour,
                        int minute,
                        int second)
        Custom constructor. Accepting values for all attributes.
    • Method Detail

      • getYear

        public int getYear()
        Getter for year attribute.
        Returns:
        the year
      • getMonth

        public int getMonth()
        Getter for month attribute.
        Returns:
        the month
      • getDay

        public int getDay()
        Getter for day attribute.
        Returns:
        the day
      • getHour

        public int getHour()
        Getter for hour attribute.
        Returns:
        the hour
      • getMinute

        public int getMinute()
        Getter for minute attribute.
        Returns:
        the minute
      • getSecond

        public int getSecond()
        Getter for second attribute.
        Returns:
        the second
      • unmarshal

        public Duration unmarshal​(java.lang.String v)
        Specified by:
        unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​Duration>
        See Also:
        javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
      • marshal

        public java.lang.String marshal​(Duration duration)
        Specified by:
        marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​Duration>
        See Also:
        javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)