Top Description Inners Fields Constructors Methods
org.python.core

pack-priv Class JavaProxyList

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, .Comparator, .ConcurrentModificationException, .Iterator, .List, .ListIterator, org.python.util.Generic

Proxy Java objects implementing java.util.List with Python methods corresponding to the standard list type

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
protected static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow
private static final PyBuiltinMethodNarrow

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static PyBuiltinMethod[]
pack-priv static PyBuiltinMethod[]
private static synchronized void
list_sort(List<E> list, PyObject cmp, PyObject key, boolean reverse)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listAppendProxyback to summary
private static final PyBuiltinMethodNarrow listAppendProxy
listCountProxyback to summary
private static final PyBuiltinMethodNarrow listCountProxy
listEqProxyback to summary
private static final PyBuiltinMethodNarrow listEqProxy
listExtendProxyback to summary
private static final PyBuiltinMethodNarrow listExtendProxy
listGetProxyback to summary
private static final PyBuiltinMethodNarrow listGetProxy
listIAddProxyback to summary
private static final PyBuiltinMethodNarrow listIAddProxy
listIMulProxyback to summary
private static final PyBuiltinMethodNarrow listIMulProxy
listIndexProxyback to summary
private static final PyBuiltinMethodNarrow listIndexProxy
listInsertProxyback to summary
private static final PyBuiltinMethodNarrow listInsertProxy
listNeProxyback to summary
private static final PyBuiltinMethodNarrow listNeProxy
listPopProxyback to summary
private static final PyBuiltinMethodNarrow listPopProxy
listRAddProxyback to summary
private static final PyBuiltinMethodNarrow listRAddProxy
listRemoveOverrideProxyback to summary
private static final PyBuiltinMethodNarrow listRemoveOverrideProxy
listRemoveProxyback to summary
private static final PyBuiltinMethodNarrow listRemoveProxy
listReverseProxyback to summary
private static final PyBuiltinMethodNarrow listReverseProxy
listSetProxyback to summary
private static final PyBuiltinMethodNarrow listSetProxy
listSortProxyback to summary
private static final PyBuiltinMethodNarrow listSortProxy

Constructor Detail

JavaProxyListback to summary
pack-priv JavaProxyList()

Method Detail

getPostProxyMethodsback to summary
pack-priv static PyBuiltinMethod[] getPostProxyMethods()
getProxyMethodsback to summary
pack-priv static PyBuiltinMethod[] getProxyMethods()
list_sortback to summary
private static synchronized void list_sort(List<E> list, PyObject cmp, PyObject key, boolean reverse)
org.python.core back to summary

private Class JavaProxyList.KV

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final PyObject
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv
KV(PyObject key, Object value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private final PyObject key
valueback to summary
private final Object value

Constructor Detail

KVback to summary
pack-priv KV(PyObject key, Object value)
org.python.core back to summary

private Class JavaProxyList.KVComparator

extends Object
implements Comparator<JavaProxyList.KV>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Field Summary

Modifier and TypeField and Description
private final PyObject

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
compare(JavaProxyList.KV
the first object to be compared.
o1
,
JavaProxyList.KV
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.

public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Implements java.util.Comparator.equals.

Indicates whether some other object is "equal to" this comparator.

Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cmpback to summary
private final PyObject cmp

Constructor Detail

KVComparatorback to summary
pack-priv KVComparator(PyObject cmp)

Method Detail

compareback to summary
public int compare(JavaProxyList.KV o1, JavaProxyList.KV o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:JavaProxyList.KV

the first object to be compared.

o2:JavaProxyList.KV

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements java.util.Comparator.equals.

Doc from java.util.Comparator.equals.

Indicates whether some other object is "equal to" this comparator. This method must obey the general contract of Object#equals(Object). Additionally, this method can return true only if the specified object is also a comparator and it imposes the same ordering as this comparator. Thus, comp1.equals(comp2) implies that signum(comp1.compare(o1, o2))==signum(comp2.compare(o1, o2)) for every object reference o1 and o2.

Note that it is always safe not to override Object.equals(Object). However, overriding this method may, in some cases, improve performance by allowing programs to determine that two distinct comparators impose the same order.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true only if the specified object is also a comparator and it imposes the same ordering as this comparator.

Annotations
@Override

org.python.core back to summary

protected Class JavaProxyList.ListIndexDelegate

extends SequenceIndexDelegate
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final List<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
delItems(int start, int stop)

Implements abstract org.python.core.SequenceIndexDelegate.delItems.

protected int
public PyObject
public PyObject
getSlice(int start, int stop, int step)

Implements abstract org.python.core.SequenceIndexDelegate.getSlice.

public String
public int
public void
public void
setSlice(int start, int stop, int step, PyObject value)

Implements abstract org.python.core.SequenceIndexDelegate.setSlice.

private final void
setsliceIterator(int start, int stop, int step, Iterator<PyObject> iter)

private final void
setsliceList(int start, int stop, int step, List<E> value)

private final void
setslicePyList(int start, int stop, int step, PyList value)

Inherited from org.python.core.SequenceIndexDelegate:
checkIdxAndDelItemcheckIdxAndFindItemcheckIdxAndFindItemcheckIdxAndGetItemcheckIdxAndSetItemcheckIdxAndSetItemcheckIdxAndSetSlicedelSlicefixindexgetSlice

Field Detail

listback to summary
private final List<E> list

Constructor Detail

ListIndexDelegateback to summary
public ListIndexDelegate(List<E> list)

Method Detail

delItemback to summary
public void delItem(int idx)

Implements abstract org.python.core.SequenceIndexDelegate.delItem.

Annotations
@Override
delItemsback to summary
public void delItems(int start, int stop)

Implements abstract org.python.core.SequenceIndexDelegate.delItems.

Annotations
@Override
fixBoundIndexback to summary
protected int fixBoundIndex(PyObject index)
getItemback to summary
public PyObject getItem(int idx)

Implements abstract org.python.core.SequenceIndexDelegate.getItem.

Annotations
@Override
getSliceback to summary
public PyObject getSlice(int start, int stop, int step)

Implements abstract org.python.core.SequenceIndexDelegate.getSlice.

Annotations
@Override
getTypeNameback to summary
public String getTypeName()

Implements abstract org.python.core.SequenceIndexDelegate.getTypeName.

Annotations
@Override
lenback to summary
public int len()

Implements abstract org.python.core.SequenceIndexDelegate.len.

Annotations
@Override
setItemback to summary
public void setItem(int idx, PyObject value)

Implements abstract org.python.core.SequenceIndexDelegate.setItem.

Annotations
@Override
setSliceback to summary
public void setSlice(int start, int stop, int step, PyObject value)

Implements abstract org.python.core.SequenceIndexDelegate.setSlice.

Annotations
@Override
setsliceIteratorback to summary
private final void setsliceIterator(int start, int stop, int step, Iterator<PyObject> iter)
setsliceListback to summary
private final void setsliceList(int start, int stop, int step, List<E> value)
setslicePyListback to summary
private final void setslicePyList(int start, int stop, int step, PyList value)
org.python.core back to summary

private Class JavaProxyList.ListMethod

extends PyBuiltinMethodNarrow
Class Inheritance
Known Direct Subclasses
org.python.core.JavaProxyList.ListMulProxyClass
Annotations
@Untraversable

Constructor Summary

AccessConstructor and Description
protected
ListMethod(String name, int numArgs)

protected
ListMethod(String name, int minArgs, int maxArgs)

Method Summary

Modifier and TypeMethod and Description
protected List<E>
protected PyBoolean

Returns:

true is equal, false if not equal and null if we can't compare
isEqual
(PyObject
The object to compare to this
other
)

Compares this object with other to check for equality.

private boolean
protected List<E>
Inherited from org.python.core.PyBuiltinMethodNarrow:
__call____call____call____call____call____call____call__

Constructor Detail

ListMethodback to summary
protected ListMethod(String name, int numArgs)
ListMethodback to summary
protected ListMethod(String name, int minArgs, int maxArgs)

Method Detail

asListback to summary
protected List<E> asList()
isEqualback to summary
protected PyBoolean isEqual(PyObject other)

Compares this object with other to check for equality. Used to implement __eq __ and __ne__. May return null if the other object cannot be compared i.e. is not a Python list or Java List.

Parameters
other:PyObject

The object to compare to this

Returns:PyBoolean

true is equal, false if not equal and null if we can't compare

isPyListback to summary
private boolean isPyList(PyObject object)
newListback to summary
protected List<E> newList()
org.python.core back to summary

private Class JavaProxyList.ListMulProxyClass

extends ListMethod
Class Inheritance
Annotations
@Untraversable

Constructor Summary

AccessConstructor and Description
protected
ListMulProxyClass(String name, int numArgs)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject
the single argument to the function.
obj
)

Overrides org.python.core.PyBuiltinMethodNarrow.__call__.

A variant of the __call__ method with one argument.

Inherited from org.python.core.JavaProxyList.ListMethod:
asListisEqualnewList

Constructor Detail

ListMulProxyClassback to summary
protected ListMulProxyClass(String name, int numArgs)

Method Detail

__call__back to summary
public PyObject __call__(PyObject obj)

Overrides org.python.core.PyBuiltinMethodNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

A variant of the __call__ method with one argument. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
obj:PyObject

the single argument to the function.

Annotations
@Override