クラス
javax.xml.datatype.Durationの使用
Durationを使用するパッケージ
-
javax.xml.datatypeでのDurationの使用
Durationを返すjavax.xml.datatypeのメソッド修飾子と型メソッド説明abstract Duration値がthis+rhsである新しいデュレーションを計算します。Duration.multiply(int factor) 値がこのデュレーションの値よりfactor倍長い新しいデュレーションを計算します。abstract DurationDuration.multiply(BigDecimal factor) 値がこのデュレーションの値よりfactor倍長い新しいデュレーションを計算します。abstract DurationDuration.negate()値が-thisであるDurationを返します。DatatypeFactory.newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) DurationをisPositive、年、月、日、時間、分、秒で指定するDurationの新しいインスタンスを取得します。abstract DurationDatatypeFactory.newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds) DurationをisPositive、年、月、日、時間、分、秒で指定するDurationの新しいインスタンスを取得します。abstract DurationDatatypeFactory.newDuration(long durationInMilliSeconds) Durationをミリ秒で指定するDurationの新しいインスタンスを取得します。abstract DurationDatatypeFactory.newDuration(String lexicalRepresentation) XML Schema 1.0のセクション3.2.6.1に定義されているように、Durationをその文字列表現「PnYnMnDTnHnMnS」で指定するDurationの新しいインスタンスを取得します。DatatypeFactory.newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration」で定義されたday、hour、minute、およびsecondを使用して、xdt:dayTimeDuration型のDurationを作成します。DatatypeFactory.newDurationDayTime(boolean isPositive, BigInteger day, BigInteger hour, BigInteger minute, BigInteger second) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration」で定義されたday、hour、minute、およびsecondを使用して、xdt:dayTimeDuration型のDurationを作成します。DatatypeFactory.newDurationDayTime(long durationInMilliseconds) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration」で定義された指定されたミリ秒を使用して、xdt:dayTimeDuration型のDurationを作成します。DatatypeFactory.newDurationDayTime(String lexicalRepresentation) String表現、「PnDTnHnMnS」、「XQuery 1.0 and XPath 2.0 Data Model」の「xdt:dayTimeDuration」を構文解析することによって、xdt:dayTimeDuration型のDurationを作成します。DatatypeFactory.newDurationYearMonth(boolean isPositive, int year, int month) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration」で定義されたyearおよびmonthを使用して、xdt:yearMonthDuration型のDurationを作成します。DatatypeFactory.newDurationYearMonth(boolean isPositive, BigInteger year, BigInteger month) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration」で定義されたyearおよびmonthを使用して、xdt:yearMonthDuration型のDurationを作成します。DatatypeFactory.newDurationYearMonth(long durationInMilliseconds) 「XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration」で定義された指定されたミリ秒を使用して、xdt:yearMonthDuration型のDurationを作成します。DatatypeFactory.newDurationYearMonth(String lexicalRepresentation) String表現、「PnYnM」、「XQuery 1.0 and XPath 2.0 Data Model」の「xdt:yearMonthDuration」を構文解析することによって、xdt:yearMonthDuration型のDurationを作成します。abstract DurationDuration.normalizeWith(Calendar startTimeInstant) 特定の時点を参照点として使用して、年および月フィールドを日フィールドに変換します。値がthis-rhsである新しいデュレーションを計算します。型Durationのパラメータを持つjavax.xml.datatypeのメソッド修飾子と型メソッド説明abstract Duration値がthis+rhsである新しいデュレーションを計算します。abstract voidこのインスタンスにdurationを追加します。abstract intこのDurationインスタンスと部分順序リレーションを比較します。booleanDuration.isLongerThan(Duration duration) このDurationオブジェクトがほかのDurationオブジェクトより確実に長いかどうかをチェックします。booleanDuration.isShorterThan(Duration duration) このDurationオブジェクトがほかのDurationオブジェクトより確実に短いかどうかをチェックします。値がthis-rhsである新しいデュレーションを計算します。