In [ ]:
package test.beakerx;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.ArrayList;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

public class BeakerTest<E> implements List<E> {

  List<E> orig;

  public BeakerTest(List<E> orig) {
    this.orig = orig;
  }

  @Override
  public int size() {
    return orig.size();
  }

  @Override
  public boolean isEmpty() {
    return orig.isEmpty();
  }

  @Override
  public boolean contains(Object o) {
    return orig.contains(o);
  }

  @Override
  public Iterator<E> iterator() {
    return orig.iterator();
  }

  @Override
  public Object[] toArray() {
    return orig.toArray();
  }

  @Override
  public <T> T[] toArray(T[] a) {
    return orig.toArray(a);
  }

  @Override
  public boolean add(E e) {
    return orig.add(e);
  }

  @Override
  public boolean remove(Object o) {
    return orig.remove(o);
  }

  @Override
  public boolean containsAll(Collection<?> c) {
    return orig.containsAll(c);
  }

  @Override
  public boolean addAll(Collection<? extends E> c) {
    return orig.addAll(c);
  }

  @Override
  public boolean addAll(int index, Collection<? extends E> c) {
    return orig.addAll(index, c);
  }

  @Override
  public boolean removeAll(Collection<?> c) {
    return orig.removeAll(c);
  }

  @Override
  public boolean retainAll(Collection<?> c) {
    return orig.retainAll(c);
  }

  @Override
  public void clear() {
    orig.clear();
  }

  @Override
  public E get(int index) {
    return orig.get(index);
  }

  @Override
  public E set(int index, E element) {
    return orig.set(index, element);
  }

  @Override
  public void add(int index, E element) {
    orig.add(index, element);
  }

  @Override
  public E remove(int index) {
    return orig.remove(index);
  }

  @Override
  public int indexOf(Object o) {
    return orig.indexOf(o);
  }

  @Override
  public int lastIndexOf(Object o) {
    return orig.lastIndexOf(o);
  }

  @Override
  public ListIterator<E> listIterator() {
    return orig.listIterator();
  }

  @Override
  public ListIterator<E> listIterator(int index) {
    return orig.listIterator(index);
  }

  @Override
  public List<E> subList(int fromIndex, int toIndex) {
    return orig.subList(fromIndex, toIndex);
  }
    
  @Override
  public String toString() {
    return "myToString method";
  }
        
}
In [ ]:
package test.beakerx;

return BeakerTest.class.hashCode();
In [ ]:
package test.beakerx;
return BeakerTest.class.hashCode();
In [ ]:
package test.beakerx;
import java.util.Arrays;
import java.util.ArrayList;
return new BeakerTest<Integer>(Arrays.asList(1,2,3,5,8,13,21));
In [ ]:
import jupyter.Displayer;
import jupyter.Displayers;
import java.util.HashMap;
import java.util.Map;
import com.twosigma.beakerx.mimetype.MIMEContainer;
import test.beakerx.BeakerTest;

Displayers.register(BeakerTest.class, new Displayer<BeakerTest>() {
      @Override
      public Map<String, String> display(BeakerTest value) {
        return new HashMap<String, String>() {{
          put(MIMEContainer.MIME.TEXT_HTML, "<div><h1>" + "From Displayers: " +value.toString() + "</h1></div>");
          
        }};
      }
    });
In [ ]:
package test.beakerx;

import java.util.Arrays;
import java.util.ArrayList;
return new BeakerTest<Integer>(Arrays.asList(1,2,3,5,8,13,21));
In [ ]: