Class PythonTimeDelta
java.lang.Object
ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
ai.timefold.jpyinterpreter.types.datetime.PythonTimeDelta
- All Implemented Interfaces:
PythonLikeObject,PythonLikeComparable<PythonTimeDelta>,PlanningImmutable,Comparable<PythonTimeDelta>
public class PythonTimeDelta
extends AbstractPythonLikeObject
implements PythonLikeComparable<PythonTimeDelta>, PlanningImmutable
Python docs: timedelta-objects
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PythonLikeTypefinal PythonIntegerfinal PythonIntegerfinal PythonIntegerstatic PythonLikeTypeFields inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
OBJECT_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription$getAttributeOrNull(String name) Gets an attribute by name.abs()add_time_delta(PythonTimeDelta other) intcompareTo(PythonTimeDelta pythonTimeDelta) divide_float(PythonFloat divisor) divide_integer(PythonInteger divisor) divide_time_delta(PythonTimeDelta divisor) booleanfloor_divide_integer(PythonInteger divisor) floor_divide_time_delta(PythonTimeDelta divisor) get_float_multiple(PythonFloat multiple) get_integer_multiple(PythonInteger multiple) inthashCode()isZero()negate()static PythonTimeDeltaof(int days, int seconds, int microseconds) static PythonTimeDeltaof(PythonNumber days, PythonNumber seconds, PythonNumber microseconds, PythonNumber milliseconds, PythonNumber minutes, PythonNumber hours, PythonNumber weeks) pos()remainder_time_delta(PythonTimeDelta divisor) toString()Methods inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
$deleteAttribute, $getType, $setAttribute, getExtraAttributeMap, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.jpyinterpreter.types.PythonLikeComparable
greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqualMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getAttributeOrError, $getGenericType, $method$__delattr__, $method$__eq__, $method$__format__, $method$__format__, $method$__getattribute__, $method$__ne__, $method$__setattr__
-
Field Details
-
TIME_DELTA_TYPE
-
$TYPE
-
days
-
seconds
-
microseconds
-
-
Constructor Details
-
PythonTimeDelta
-
-
Method Details
-
$getAttributeOrNull
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Overrides:
$getAttributeOrNullin classAbstractPythonLikeObject- Parameters:
name- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
of
-
of
public static PythonTimeDelta of(PythonNumber days, PythonNumber seconds, PythonNumber microseconds, PythonNumber milliseconds, PythonNumber minutes, PythonNumber hours, PythonNumber weeks) -
total_seconds
-
add_time_delta
-
subtract_time_delta
-
get_integer_multiple
-
get_float_multiple
-
divide_time_delta
-
divide_integer
-
divide_float
-
floor_divide_time_delta
-
floor_divide_integer
-
remainder_time_delta
-
pos
-
negate
-
abs
-
toPythonString
-
toPythonRepr
-
isZero
-
$method$__str__
- Specified by:
$method$__str__in interfacePythonLikeObject
-
toString
- Overrides:
toStringin classAbstractPythonLikeObject
-
equals
-
hashCode
public int hashCode() -
$method$__repr__
- Specified by:
$method$__repr__in interfacePythonLikeObject
-
$method$__hash__
- Specified by:
$method$__hash__in interfacePythonLikeObject
-
compareTo
- Specified by:
compareToin interfaceComparable<PythonTimeDelta>
-