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

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

Issue 29453722: Noissue - Lint adjustments and optimizations (Closed)
Patch Set: Adjusting HashSet initialization in Subscription Created July 19, 2017, 4:40 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 /** 22 /**
21 * Class for querying subscription information from the engine. 23 * Class for querying subscription information from the engine.
22 */ 24 */
23 public class SubscriptionInfo implements Comparable<SubscriptionInfo> 25 public class SubscriptionInfo implements Comparable<SubscriptionInfo>
24 { 26 {
25 public enum Type 27 public enum Type
26 { 28 {
27 ADS, 29 ADS,
28 OTHER, 30 OTHER,
29 CUSTOM, 31 CUSTOM,
30 INITIALIZING, 32 INITIALIZING,
31 USER_FILTERS, 33 USER_FILTERS,
32 USER_EXCEPTIONS, 34 USER_EXCEPTIONS,
33 ACCEPTABLE_ADS 35 ACCEPTABLE_ADS
34 } 36 }
35 37
36 private final Type type; 38 private final Type type;
37 private final String id; 39 private final String id;
38 private final String url; 40 private final String url;
39 private String title; 41 private String title;
40 private boolean enabled = false; 42 private boolean enabled = false;
41 private long lastUpdate; 43 private long lastUpdate;
42 44
43 SubscriptionInfo(final Type type, final String id, final String url, final Str ing title, final boolean enabled, final long lastUpdate) 45 private SubscriptionInfo(final Type type, final String id, final String url, f inal String title, final boolean enabled, final long lastUpdate)
44 { 46 {
45 this.type = type; 47 this.type = type;
46 this.id = id; 48 this.id = id;
47 this.url = url; 49 this.url = url;
48 this.title = title; 50 this.title = title;
49 this.enabled = enabled; 51 this.enabled = enabled;
50 this.lastUpdate = lastUpdate; 52 this.lastUpdate = lastUpdate;
51 } 53 }
52 54
53 public Type getType() 55 public Type getType()
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 return new SubscriptionInfo(type, 144 return new SubscriptionInfo(type,
143 subscription.getId(), 145 subscription.getId(),
144 url, 146 url,
145 title, 147 title,
146 subscription.isEnabled(), 148 subscription.isEnabled(),
147 subscription.getLastUpdateTimestamp()); 149 subscription.getLastUpdateTimestamp());
148 } 150 }
149 151
150 @Override 152 @Override
151 public int compareTo(final SubscriptionInfo another) 153 public int compareTo(@NonNull final SubscriptionInfo another)
152 { 154 {
153 return this.getTitle().compareTo(another.getTitle()); 155 return this.getTitle().compareTo(another.getTitle());
154 } 156 }
155 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld