Class PythonLikeDict<K extends PythonLikeObject,V extends PythonLikeObject>
java.lang.Object
ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
ai.timefold.jpyinterpreter.types.collections.PythonLikeDict<K,V>
- All Implemented Interfaces:
PythonLikeObject,PlanningCloneable<PythonLikeDict<K,,V>> Iterable<PythonLikeObject>,Map<K,V>
public class PythonLikeDict<K extends PythonLikeObject,V extends PythonLikeObject>
extends AbstractPythonLikeObject
implements Map<K,V>, PlanningCloneable<PythonLikeDict<K,V>>, Iterable<PythonLikeObject>
-
Nested Class Summary
-
Field Summary
FieldsFields inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
OBJECT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionPythonLikeDict(int size) PythonLikeDict(org.apache.commons.collections4.OrderedMap<PythonLikeObject, PythonLikeObject> source) -
Method Summary
Modifier and TypeMethodDescriptionbinaryInplaceOr(PythonLikeDict<K, V> other) binaryOr(PythonLikeDict<K, V> other) voidclear()concatToNew(PythonLikeDict other) concatToSelf(PythonLikeDict other) booleancontainsKey(Object key) booleancontainsValue(Object value) copy()entrySet()booleangetItemOrDefault(PythonLikeObject key, PythonLikeObject defaultValue) getItems()getSize()inthashCode()booleanisEmpty()iterator()keySet()mirror(Map<String, PythonLikeObject> globals) popItemOrDefault(PythonLikeObject key, PythonLikeObject defaultValue) popLast()put(PythonLikeObject key, PythonLikeObject value) voidreversed()setIfAbsent(PythonLikeObject key, PythonLikeObject defaultValue) setItem(PythonLikeObject key, PythonLikeObject value) intsize()toString()update(PythonLikeObject iterable) update(PythonLikeDict other) values()Methods inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
$deleteAttribute, $getAttributeOrNull, $getType, $setAttribute, getExtraAttributeMap, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getAttributeOrError, $getGenericType, $method$__delattr__, $method$__eq__, $method$__format__, $method$__format__, $method$__getattribute__, $method$__hash__, $method$__ne__, $method$__repr__, $method$__setattr__
-
Field Details
-
delegate
public final org.apache.commons.collections4.OrderedMap delegate
-
-
Constructor Details
-
PythonLikeDict
public PythonLikeDict() -
PythonLikeDict
public PythonLikeDict(int size) -
PythonLikeDict
public PythonLikeDict(org.apache.commons.collections4.OrderedMap<PythonLikeObject, PythonLikeObject> source)
-
-
Method Details
-
createNewInstance
- Specified by:
createNewInstancein interfacePlanningCloneable<K extends PythonLikeObject>
-
mirror
public static PythonLikeDict<PythonString,PythonLikeObject> mirror(Map<String, PythonLikeObject> globals) -
toFlattenKeyValueTuple
-
copy
-
concatToNew
-
concatToSelf
-
getSize
-
getKeyIterator
-
getItemOrError
-
getItemOrNone
-
getItemOrDefault
-
getItems
-
getKeyView
-
setItem
-
removeItemOrError
-
isKeyInDict
-
clearDict
-
popItemOrError
-
popItemOrDefault
-
popLast
-
reversed
-
setIfAbsent
-
setIfAbsent
-
update
-
update
-
getValueView
-
binaryOr
-
binaryInplaceOr
-
size
public int size()- Specified by:
sizein interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
containsValue
- Specified by:
containsValuein interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
get
- Specified by:
getin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
put
- Specified by:
putin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
remove
- Specified by:
removein interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
putAll
- Specified by:
putAllin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
clear
public void clear()- Specified by:
clearin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
keySet
- Specified by:
keySetin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
values
- Specified by:
valuesin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
entrySet
- Specified by:
entrySetin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject>
-
iterator
- Specified by:
iteratorin interfaceIterable<K extends PythonLikeObject>
-
equals
- Specified by:
equalsin interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject> - Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceMap<K extends PythonLikeObject,V extends PythonLikeObject> - Overrides:
hashCodein classObject
-
$method$__str__
- Specified by:
$method$__str__in interfacePythonLikeObject
-
toString
- Overrides:
toStringin classAbstractPythonLikeObject
-