Back to project page StreamHub-Android-Reviews-App.
The source code is released under:
MIT License
If you think the Android project StreamHub-Android-Reviews-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.filepicker.sdk; /*from www. j a v a 2 s .c o m*/ import java.util.LinkedList; class FixedSizeList<T> { private final int maxSize; private final LinkedList<T> list = new LinkedList<T>(); public FixedSizeList(int maxSize) { this.maxSize = maxSize < 0 ? 0 : maxSize; // don't make bigger than 0 } public T add(T t) { list.add(t); return list.size() > maxSize ? list.remove() : null; } }