Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public final void evictAll() {
* of entries in the cache. For all other caches, this returns the sum of
* the sizes of the entries in this cache.
*/
public synchronized final int size() {
public final synchronized int size() {
return size;
}

Expand All @@ -298,57 +298,57 @@ public synchronized final int size() {
* number of entries in the cache. For all other caches, this returns the
* maximum sum of the sizes of the entries in this cache.
*/
public synchronized final int maxSize() {
public final synchronized int maxSize() {
return maxSize;
}

/**
* Returns the number of times {@link #get} returned a value that was
* already present in the cache.
*/
public synchronized final int hitCount() {
public final synchronized int hitCount() {
return hitCount;
}

/**
* Returns the number of times {@link #get} returned null or required a new
* value to be created.
*/
public synchronized final int missCount() {
public final synchronized int missCount() {
return missCount;
}

/**
* Returns the number of times {@link #create(Object)} returned a value.
*/
public synchronized final int createCount() {
public final synchronized int createCount() {
return createCount;
}

/**
* Returns the number of times {@link #put} was called.
*/
public synchronized final int putCount() {
public final synchronized int putCount() {
return putCount;
}

/**
* Returns the number of values that have been evicted.
*/
public synchronized final int evictionCount() {
public final synchronized int evictionCount() {
return evictionCount;
}

/**
* Returns a copy of the current contents of the cache, ordered from least
* recently accessed to most recently accessed.
*/
public synchronized final Map<K, V> snapshot() {
public final synchronized Map<K, V> snapshot() {
return new LinkedHashMap<K, V>(map);
}

@Override
public synchronized final String toString() {
public final synchronized String toString() {
int accesses = hitCount + missCount;
int hitPercent = accesses != 0 ? (100 * hitCount / accesses) : 0;
return String.format("LruCache[maxSize=%d,hits=%d,misses=%d,hitRate=%d%%]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public JsonRequest(int method, String url, String requestBody, IListener<T> list
}

@Override
abstract protected Response<T> parseNetworkResponse(NetworkResponse response);
protected abstract Response<T> parseNetworkResponse(NetworkResponse response);

@Override
public String getBodyContentType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected void onPrepareRequest(HttpUriRequest request) throws IOException {
* The HttpPatch class does not exist in the Android framework, so this has been defined here.
*/
public static final class HttpPatch extends HttpEntityEnclosingRequestBase {
public final static String METHOD_NAME = "PATCH";
public static final String METHOD_NAME = "PATCH";

public HttpPatch() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
public class FileDownloadActivity extends BaseActivity implements
View.OnClickListener, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener {
public final static DecimalFormat DECIMAL_POINT = new DecimalFormat("0.0");
public static final DecimalFormat DECIMAL_POINT = new DecimalFormat("0.0");

private LinkedList<DownloadTask> mTaskList;
private LinkedList<DownloadTask> mDownloadList;
Expand Down