Duration (Axis API)
Keywords: org.apache.axis.types.Duration,Duration class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis.types
Class Duration

    java.lang.Object
      |
      +--org.apache.axis.types.Duration

All Implemented Interfaces:
  java.io.Serializable

public class Duration
extends java.lang.Object
implements java.io.Serializable

Implementation of the XML Schema type duration

Author:
  Wes Moulder
See Also:
  XML Schema 3.2.6, Serialized Form

Constructor Summary
`Duration()` Default no-arg constructor
`Duration(boolean negative, int aYears, int aMonths, int aDays, int aHours, int aMinutes, double aSeconds)`
`Duration(java.lang.String duration)` This method takes a string that represents an xsd:duration and parses it.

Method Summary
`boolean` | `equals(java.lang.Object object)` This currently does a verbatim check on the object.
`int` | `getDays()`
`int` | `getHours()`
`int` | `getMinutes()`
`int` | `getMonths()`
`double` | `getSeconds()`
`int` | `getYears()`
`int` | `hashCode()`
`boolean` | `isNegative()`
`void` | `parseDate(java.lang.String date)` This method parses the date portion of a duration.
`void` | `parseTime(java.lang.String time)` This method parses the time portion of a duration.
`void` | `setDays(int days)`
`void` | `setHours(int hours)`
`void` | `setMinutes(int minutes)`
`void` | `setMonths(int months)`
`void` | `setNegative(boolean negative)`
`void` | `setSeconds(int seconds)`
`void` | `setYears(int years)`
`java.lang.String` | `toString()` This returns the xml representation of an xsd:duration object.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Duration

    public Duration()

  Default no-arg constructor

### Duration

    public Duration(boolean negative,
                    int aYears,
                    int aMonths,
                    int aDays,
                    int aHours,
                    int aMinutes,
                    double aSeconds)

Parameters:
  `negative` -
  `aYears` -
  `aMonths` -
  `aDays` -
  `aHours` -
  `aMinutes` -
  `aSeconds` -

### Duration

    public Duration(java.lang.String duration)
             throws java.lang.IllegalArgumentException

  This method takes a string that represents an xsd:duration and parses it.

Parameters:
  `duration` -
Throws:
  `SchemaException` - if the string doesn't parse correctly.
  `java.lang.IllegalArgumentException`

Method Detail

### parseTime

    public void parseTime(java.lang.String time)

  This method parses the time portion of a duration.

  Parameters:
    `time` -

### parseDate

    public void parseDate(java.lang.String date)

  This method parses the date portion of a duration.

  Parameters:
    `date` -

### isNegative

    public boolean isNegative()

### getYears

    public int getYears()

### getMonths

    public int getMonths()

### getDays

    public int getDays()

### getHours

    public int getHours()

### getMinutes

    public int getMinutes()

### getSeconds

    public double getSeconds()

### setNegative

    public void setNegative(boolean negative)

  Parameters:
    `negative` -

### setYears

    public void setYears(int years)

  Parameters:
    `years` -

### setMonths

    public void setMonths(int months)

  Parameters:
    `months` -

### setDays

    public void setDays(int days)

  Parameters:
    `days` -

### setHours

    public void setHours(int hours)

  Parameters:
    `hours` -

### setMinutes

    public void setMinutes(int minutes)

  Parameters:
    `minutes` -

### setSeconds

    public void setSeconds(int seconds)

  Parameters:
    `seconds` -

### toString

    public java.lang.String toString()

  This returns the xml representation of an xsd:duration object.

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object object)

  This currently does a verbatim check on the object. If you have a duration that is 60 minutes, and one that is 1 hour, they won't be equal.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `object` -

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Apache Web Services Project. All Rights Reserved.