Code example for Deque

Methods: addLast

0
        } 
    } 
 
    void enqueue(final Object obj) {
        if (obj != null) {
            pending.addLast(obj);
        } 
    } 
 
    void increaseSize(final Class<?> clazz, final long objectSize) {
        ClassHistogramElement he = histogram.get(clazz);
        if(he == null) {
            he = new ClassHistogramElement(clazz);
            histogram.put(clazz, he);
        } 
        he.addInstance(objectSize);
        size += objectSize;
    } 
 
    static long roundTo(final long x, final int multiple) {
        return ((x + multiple - 1) / multiple) * multiple;