Package system
Class TimeSpan
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.ValueType
-
- system.TimeSpan
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class TimeSpan extends ValueType
The base .NET class managing System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.TimeSpan
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.String
assemblyShortName
Assembly name: mscorlibstatic java.lang.String
className
Qualified class name: System.TimeSpanstatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description TimeSpan()
TimeSpan(int hours, int minutes, int seconds)
TimeSpan(int days, int hours, int minutes, int seconds)
TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds)
TimeSpan(long ticks)
TimeSpan(java.lang.Object instance)
Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeSpan
Add(TimeSpan ts)
static TimeSpan
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoTimeSpan
, a cast assert is made to check if types are compatible.static int
Compare(TimeSpan t1, TimeSpan t2)
int
CompareTo(NetObject value)
int
CompareTo(TimeSpan value)
TimeSpan
Duration()
boolean
Equals(TimeSpan obj)
static boolean
Equals(TimeSpan t1, TimeSpan t2)
static TimeSpan
FromDays(double value)
static TimeSpan
FromHours(double value)
static TimeSpan
FromMilliseconds(double value)
static TimeSpan
FromMinutes(double value)
static TimeSpan
FromSeconds(double value)
static TimeSpan
FromTicks(long value)
int
getDays()
int
getHours()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typeint
getMilliseconds()
int
getMinutes()
int
getSeconds()
long
getTicks()
double
getTotalDays()
double
getTotalHours()
double
getTotalMilliseconds()
double
getTotalMinutes()
double
getTotalSeconds()
TimeSpan
Negate()
static TimeSpan
Parse(java.lang.String s)
static TimeSpan
Parse(java.lang.String input, IFormatProvider formatProvider)
static TimeSpan
ParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider)
static TimeSpan
ParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, TimeSpanStyles styles)
static TimeSpan
ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider)
static TimeSpan
ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, TimeSpanStyles styles)
static TimeSpan
ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2)
static TimeSpan
ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2, TimeSpanStyles dupParam3)
void
setJCOInstance(JCObject instance)
TimeSpan
Subtract(TimeSpan ts)
java.lang.String
ToString(java.lang.String format)
java.lang.String
ToString(java.lang.String format, IFormatProvider formatProvider)
static boolean
TryParse(java.lang.String s, JCORefOut<TimeSpan> result)
static boolean
TryParse(java.lang.String input, IFormatProvider formatProvider, JCORefOut<TimeSpan> result)
static boolean
TryParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, JCORefOut<TimeSpan> result)
static boolean
TryParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, TimeSpanStyles styles, JCORefOut<TimeSpan> result)
static boolean
TryParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, JCORefOut<TimeSpan> result)
static boolean
TryParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, TimeSpanStyles styles, JCORefOut<TimeSpan> result)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.TimeSpan- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TimeSpan
public TimeSpan(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
TimeSpan
public TimeSpan() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
TimeSpan
public TimeSpan(int hours, int minutes, int seconds) throws java.lang.Throwable, ArgumentOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
-
TimeSpan
public TimeSpan(int days, int hours, int minutes, int seconds) throws java.lang.Throwable, ArgumentOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
-
TimeSpan
public TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds) throws java.lang.Throwable, ArgumentOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentOutOfRangeException
-
TimeSpan
public TimeSpan(long ticks) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classValueType
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classValueType
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classValueType
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classValueType
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classValueType
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classValueType
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static TimeSpan cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoTimeSpan
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
TimeSpan
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
Equals
public boolean Equals(TimeSpan obj) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Equals
public static boolean Equals(TimeSpan t1, TimeSpan t2) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
TryParse
public static boolean TryParse(java.lang.String input, IFormatProvider formatProvider, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentOutOfRangeException, TypeInitializationException, InvalidOperationException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
TryParse
public static boolean TryParse(java.lang.String s, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentOutOfRangeException, TypeInitializationException, InvalidOperationException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
TryParseExact
public static boolean TryParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, TimeSpanStyles styles, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentException, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
TryParseExact
public static boolean TryParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
TryParseExact
public static boolean TryParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, TimeSpanStyles styles, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentException, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
IndexOutOfRangeException
-
TryParseExact
public static boolean TryParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, JCORefOut<TimeSpan> result) throws java.lang.Throwable, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentException
IndexOutOfRangeException
-
Compare
public static int Compare(TimeSpan t1, TimeSpan t2) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CompareTo
public int CompareTo(NetObject value) throws java.lang.Throwable, ArgumentException
- Throws:
java.lang.Throwable
ArgumentException
-
CompareTo
public int CompareTo(TimeSpan value) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
ToString
public java.lang.String ToString(java.lang.String format) throws java.lang.Throwable, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, IndexOutOfRangeException, ArgumentException, CultureNotFoundException, NotSupportedException, InvalidOperationException, NullReferenceException, FormatException
-
ToString
public java.lang.String ToString(java.lang.String format, IFormatProvider formatProvider) throws java.lang.Throwable, ArgumentOutOfRangeException, OutOfMemoryException, ArgumentNullException, IndexOutOfRangeException, ArgumentException, CultureNotFoundException, NotSupportedException, InvalidOperationException, NullReferenceException, FormatException
-
Add
public TimeSpan Add(TimeSpan ts) throws java.lang.Throwable, OverflowException
- Throws:
java.lang.Throwable
OverflowException
-
Duration
public TimeSpan Duration() throws java.lang.Throwable, OverflowException
- Throws:
java.lang.Throwable
OverflowException
-
FromDays
public static TimeSpan FromDays(double value) throws java.lang.Throwable, ArgumentException, OverflowException
- Throws:
java.lang.Throwable
ArgumentException
OverflowException
-
FromHours
public static TimeSpan FromHours(double value) throws java.lang.Throwable, ArgumentException, OverflowException
- Throws:
java.lang.Throwable
ArgumentException
OverflowException
-
FromMilliseconds
public static TimeSpan FromMilliseconds(double value) throws java.lang.Throwable, ArgumentException, OverflowException
- Throws:
java.lang.Throwable
ArgumentException
OverflowException
-
FromMinutes
public static TimeSpan FromMinutes(double value) throws java.lang.Throwable, ArgumentException, OverflowException
- Throws:
java.lang.Throwable
ArgumentException
OverflowException
-
FromSeconds
public static TimeSpan FromSeconds(double value) throws java.lang.Throwable, ArgumentException, OverflowException
- Throws:
java.lang.Throwable
ArgumentException
OverflowException
-
FromTicks
public static TimeSpan FromTicks(long value) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Negate
public TimeSpan Negate() throws java.lang.Throwable, OverflowException
- Throws:
java.lang.Throwable
OverflowException
-
Parse
public static TimeSpan Parse(java.lang.String s) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentOutOfRangeException, TypeInitializationException, InvalidOperationException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
Parse
public static TimeSpan Parse(java.lang.String input, IFormatProvider formatProvider) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentOutOfRangeException, TypeInitializationException, InvalidOperationException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider) throws java.lang.Throwable, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String input, java.lang.String format, IFormatProvider formatProvider, TimeSpanStyles styles) throws java.lang.Throwable, ArgumentException, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, NotSupportedException, IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider) throws java.lang.Throwable, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentException
IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2) throws java.lang.Throwable, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentException
IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String input, java.lang.String[] formats, IFormatProvider formatProvider, TimeSpanStyles styles) throws java.lang.Throwable, ArgumentException, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
IndexOutOfRangeException
-
ParseExact
public static TimeSpan ParseExact(java.lang.String dupParam0, JCORefOut dupParam1, IFormatProvider dupParam2, TimeSpanStyles dupParam3) throws java.lang.Throwable, ArgumentException, ArgumentNullException, FormatException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentNullException
FormatException
InvalidOperationException
ArgumentOutOfRangeException
IndexOutOfRangeException
-
Subtract
public TimeSpan Subtract(TimeSpan ts) throws java.lang.Throwable, OverflowException
- Throws:
java.lang.Throwable
OverflowException
-
getTotalDays
public double getTotalDays() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getTotalHours
public double getTotalHours() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getTotalMilliseconds
public double getTotalMilliseconds() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getTotalMinutes
public double getTotalMinutes() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getTotalSeconds
public double getTotalSeconds() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getDays
public int getDays() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getHours
public int getHours() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getMilliseconds
public int getMilliseconds() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getMinutes
public int getMinutes() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getSeconds
public int getSeconds() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getTicks
public long getTicks() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-