001    package com.google.gwt.maps.client.services;
002    
003    import com.google.gwt.core.client.JavaScriptObject;
004    
005    /**
006     * A representation of duration as a numeric value and a display string.
007     * <br><br>
008     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#Duration">Duration API Doc</a>
009     */
010    public class Duration extends JavaScriptObject {
011      
012      /**
013       * use newInstance();
014       */
015      protected Duration() {}
016    
017      /**
018       * A representation of duration as a numeric value and a display string.
019       */
020      public static final Duration newInstance() {
021        return JavaScriptObject.createObject().cast();
022      }
023    
024      /**
025       * A string representation of the duration value.
026       * @param text
027       */
028      public final native void setText(String text) /*-{
029        this.text = text;
030      }-*/;
031      
032      /**
033       * A string representation of the duration value.
034       */
035      public final native String getText() /*-{
036        return this.text;
037      }-*/;
038      
039      /**
040       * The duration in seconds.
041       * @param value
042       */
043      public final native void setValue(int value) /*-{
044        this.value = value;
045      }-*/;
046      
047      /**
048       * The duration in seconds.
049       */
050      public final native int getValue() /*-{
051        return this.value;
052      }-*/;
053      
054    }