Check out example codes for "T implements comparable". It will help you in understanding the concepts better.

Code Example 1

public static class Node<T extends Comparable<T>> { //HERE

    private T value;

    public Node(T val) {
        this.value = val;
    }

    public void insert(T val) {
        if (value.compareTo(val) > 0) {
            new Node<T>(val);
        }
    }
}

Learn ReactJs, React Native from akashmittal.com