Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/DefaultSubscriptionInfo.java

Issue 29453722: Noissue - Lint adjustments and optimizations (Closed)
Patch Set: Created June 1, 2017, 9:30 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.sbrowser.contentblocker.engine; 18 package org.adblockplus.sbrowser.contentblocker.engine;
19 19
20 import android.support.annotation.NonNull;
21
20 import java.util.ArrayList; 22 import java.util.ArrayList;
21 import java.util.HashMap; 23 import java.util.HashMap;
22 import java.util.List; 24 import java.util.List;
23 25
24 public final class DefaultSubscriptionInfo implements Comparable<DefaultSubscrip tionInfo> 26 public final class DefaultSubscriptionInfo implements Comparable<DefaultSubscrip tionInfo>
25 { 27 {
26 private final static String KEY_TITLE = "title"; 28 private final static String KEY_TITLE = "title";
27 private final static String KEY_URL = "url"; 29 private final static String KEY_URL = "url";
28 private final static String KEY_AUTHOR = "author"; 30 private final static String KEY_AUTHOR = "author";
29 private final static String KEY_PREFIXES = "prefixes"; 31 private final static String KEY_PREFIXES = "prefixes";
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { 79 {
78 return this.getValue(KEY_TYPE); 80 return this.getValue(KEY_TYPE);
79 } 81 }
80 82
81 public boolean isComplete() 83 public boolean isComplete()
82 { 84 {
83 return this.getValue(KEY_COMPLETE).equals("true"); 85 return this.getValue(KEY_COMPLETE).equals("true");
84 } 86 }
85 87
86 @Override 88 @Override
87 public int compareTo(final DefaultSubscriptionInfo o) 89 public int compareTo(@NonNull final DefaultSubscriptionInfo o)
88 { 90 {
89 final int cmp = this.getTitle().compareTo(o.getTitle()); 91 final int cmp = this.getTitle().compareTo(o.getTitle());
90 if (cmp != 0) 92 if (cmp != 0)
91 { 93 {
92 return cmp; 94 return cmp;
93 } 95 }
94 return this.getUrl().compareTo(o.getUrl()); 96 return this.getUrl().compareTo(o.getUrl());
95 } 97 }
96 98
97 @Override 99 @Override
98 public String toString() 100 public String toString()
99 { 101 {
100 return this.getTitle() + ": " + this.getUrl(); 102 return this.getTitle() + ": " + this.getUrl();
101 } 103 }
102 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld