How to convert a Python 2 code snippet to Java?

I'm trying to implement a BPlusTree using Java. I take the reference of the following python code: –

Node class (object):
def __init __ (self, order):
self.order = order
self.keys = []
        self.values ​​= []
        self.leaf = True

class BPlusTree (object):

def __init __ (self, order = 8):
self.root = Node (order) <------------------

def _find (self, node, key):

for i, item to enumerate (node.keys):
if key <article:
returns node.values[i], I
returns node.values[i + 1], i + 1

def insert (auto, key, value):

parent = none
child = auto.root

while not child.leaf: # Specifically this part
parent = child
child, index = self._find (child, key) <--------

In the Python code above, the member function def _find (class BPlusTree) returns two values.
Q 1) .Retroting multiple values ​​in Python is allowed. But that does not work in Java. How to return multiple values ​​when trying to convert this code to Java? (I tried to store the 2 arguments in an ArrayList and return this ArrayList, but it did not work)

Below, the Java code translates:

class node {
int command;
listing keys;
List of values;
boolean isLeaf;
capsule node2;
int item;

node (int m) {
order = m;
keys = new ArrayList (); // List of keys
values ​​= new ArrayList (); // List of values
isLeaf = true;

the class BPlusTree extends the node {
the root of the node;

BPlusTree (int order) {
super (order);
this.root = new node (order);
List search (node ​​n, key int) {
int i;
List val = new ArrayList ();
capsule node1 = new node (1);
List lo = new ArrayList ();
for (i = 0; i <n.keys.size (); i ++) {
if (key <n.keys.get (i)) {
lo.add (n.values.get (i));
lo.add (i);
return lo;
lo.add (n.values.get (i + 1));
lo.add (i + 1);
return lo;

void insert (int key, int value) {
parent node = null;
int index;
BPlusTree child = this.root;
while (! child.isLeaf) {// Bros, double check
parent = child;

List lo = new ArrayList ();
lo = this.find (child, key);
child = lo.get (0);
index = lo.get (1);

Q2) The code above gives this error:

enter the description of the image here

The first value returned by the _find function is of type Object (in python). What is the correct Java translation for python code?