Class PythonObjectWrapper
java.lang.Object
ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
ai.timefold.jpyinterpreter.types.CPythonBackedPythonLikeObject
ai.timefold.jpyinterpreter.types.wrappers.PythonObjectWrapper
- All Implemented Interfaces:
PythonLikeObject,PythonIterator<PythonLikeObject>,PythonLikeFunction,Comparable<PythonObjectWrapper>,Iterator<PythonLikeObject>
public class PythonObjectWrapper
extends CPythonBackedPythonLikeObject
implements PythonLikeObject, PythonLikeFunction, PythonIterator<PythonLikeObject>, Comparable<PythonObjectWrapper>
-
Field Summary
Fields inherited from class ai.timefold.jpyinterpreter.types.CPythonBackedPythonLikeObject
$cpythonId, $cpythonReference, $instanceMap, CPYTHON_BACKED_OBJECT_TYPEFields inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
OBJECT_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription$call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Calls the function with positional arguments and named arguments.void$deleteAttribute(String attributeName) Delete an attribute by name.$getAttributeOrNull(String attributeName) Gets an attribute by name.void$setAttribute(String attributeName, PythonLikeObject value) Sets an attribute by name.intcompareTo(PythonObjectWrapper other) booleaninthashCode()booleanhasNext()next()toString()Methods inherited from class ai.timefold.jpyinterpreter.types.CPythonBackedPythonLikeObject
$getCPythonId, $getCPythonReference, $getInstanceMap, $readFieldsFromCPythonReference, $setCPythonReference, $setInstanceMap, $shouldCreateNewInstance, $writeFieldsToCPythonReferenceMethods inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
$getType, getExtraAttributeMap, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface ai.timefold.jpyinterpreter.types.PythonLikeFunction
$getTypeMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getAttributeOrError, $getGenericType, $method$__delattr__, $method$__eq__, $method$__format__, $method$__format__, $method$__getattribute__, $method$__ne__, $method$__repr__, $method$__setattr__, $method$__str__
-
Constructor Details
-
PythonObjectWrapper
-
-
Method Details
-
getWrappedObject
-
$getAttributeOrNull
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrNullin interfacePythonLikeFunction- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Overrides:
$getAttributeOrNullin classAbstractPythonLikeObject- Parameters:
attributeName- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
$setAttribute
Description copied from interface:PythonLikeObjectSets an attribute by name.- Specified by:
$setAttributein interfacePythonLikeFunction- Specified by:
$setAttributein interfacePythonLikeObject- Overrides:
$setAttributein classAbstractPythonLikeObject- Parameters:
attributeName- Name of the attribute to setvalue- Value to set the attribute to
-
$deleteAttribute
Description copied from interface:PythonLikeObjectDelete an attribute by name.- Specified by:
$deleteAttributein interfacePythonLikeFunction- Specified by:
$deleteAttributein interfacePythonLikeObject- Overrides:
$deleteAttributein classAbstractPythonLikeObject- Parameters:
attributeName- Name of the attribute to delete
-
$call
public PythonLikeObject $call(List<PythonLikeObject> positionalArguments, Map<PythonString, PythonLikeObject> namedArguments, PythonLikeObject callerInstance) Description copied from interface:PythonLikeFunctionCalls the function with positional arguments and named arguments.- Specified by:
$callin interfacePythonLikeFunction- Overrides:
$callin classCPythonBackedPythonLikeObject- Parameters:
positionalArguments- Positional argumentsnamedArguments- Named argumentscallerInstance- The first argument passed to the caller, if any; null otherwise (used for super)- Returns:
- The function result
-
compareTo
- Specified by:
compareToin interfaceComparable<PythonObjectWrapper>
-
equals
-
hashCode
public int hashCode() -
$method$__hash__
- Specified by:
$method$__hash__in interfacePythonLikeObject
-
toString
- Overrides:
toStringin classAbstractPythonLikeObject
-
nextPythonItem
- Specified by:
nextPythonItemin interfacePythonIterator<PythonLikeObject>
-
getIterator
- Specified by:
getIteratorin interfacePythonIterator<PythonLikeObject>
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<PythonLikeObject>
-
next
- Specified by:
nextin interfaceIterator<PythonLikeObject>
-