| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | |
| 3 * Copyright (C) 2006-2016 Eyeo GmbH | |
| 4 * | |
| 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 | |
| 7 * published by the Free Software Foundation. | |
| 8 * | |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 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/>. | |
| 16 */ | |
| 17 | |
| 18 package org.adblockplus.libadblockplus.android.settings; | |
| 19 | |
| 20 import org.adblockplus.libadblockplus.android.Subscription; | |
| 21 | |
| 22 import java.io.Serializable; | |
| 23 import java.util.Arrays; | |
| 24 import java.util.HashSet; | |
| 25 import java.util.LinkedList; | |
| 26 import java.util.List; | |
| 27 import java.util.Set; | |
|
diegocarloslima
2016/11/08 16:30:42
Arrays, HashSet, LinkedList and Set imports doesn'
anton
2016/11/09 12:30:33
Acknowledged.
| |
| 28 | |
| 29 /** | |
| 30 * Adblock settings | |
| 31 */ | |
| 32 public class AdblockSettings implements Serializable | |
| 33 { | |
| 34 private transient boolean adblockEnabled; | |
| 35 | |
| 36 public boolean isAdblockEnabled() | |
| 37 { | |
| 38 return adblockEnabled; | |
| 39 } | |
| 40 | |
| 41 public void setAdblockEnabled(boolean adblockEnabled) | |
| 42 { | |
| 43 this.adblockEnabled = adblockEnabled; | |
| 44 } | |
| 45 | |
| 46 private transient Boolean acceptableAdsEnabled; | |
|
diegocarloslima
2016/11/08 16:30:43
I feel like having member variable declarations mi
anton
2016/11/09 12:30:32
I feel comfortable with both styles because of adv
| |
| 47 | |
| 48 public boolean isAcceptableAdsEnabled() | |
| 49 { | |
| 50 return acceptableAdsEnabled; | |
| 51 } | |
| 52 | |
| 53 public void setAcceptableAdsEnabled(boolean acceptableAdsEnabled) | |
| 54 { | |
| 55 this.acceptableAdsEnabled = acceptableAdsEnabled; | |
| 56 } | |
| 57 | |
| 58 private List<Subscription> subscriptions; | |
|
diegocarloslima
2016/11/08 16:30:42
I feel like having member variable declarations mi
anton
2016/11/09 12:30:33
I feel comfortable with both styles because of adv
| |
| 59 | |
| 60 public List<Subscription> getSubscriptions() | |
| 61 { | |
| 62 return subscriptions; | |
| 63 } | |
| 64 | |
| 65 public void setSubscriptions(List<Subscription> subscriptions) | |
| 66 { | |
| 67 this.subscriptions = subscriptions; | |
| 68 } | |
| 69 | |
| 70 private List<String> whitelistedDomains; | |
|
diegocarloslima
2016/11/08 16:30:42
I feel like having member variable declarations mi
anton
2016/11/09 12:30:32
I feel comfortable with both styles because of adv
| |
| 71 | |
| 72 public List<String> getWhitelistedDomains() | |
| 73 { | |
| 74 return whitelistedDomains; | |
| 75 } | |
| 76 | |
| 77 public void setWhitelistedDomains(List<String> whitelistedDomains) | |
| 78 { | |
| 79 this.whitelistedDomains = whitelistedDomains; | |
| 80 } | |
| 81 | |
| 82 @Override | |
| 83 public String toString() | |
| 84 { | |
| 85 return "AdblockSettings{" + | |
| 86 "adblockEnabled=" + adblockEnabled + | |
| 87 ", acceptableAdsEnabled=" + acceptableAdsEnabled + | |
| 88 ", subscriptions:" + (subscriptions != null ? subscriptions.size() : 0) + | |
| 89 ", whitelistedDomains:" + (whitelistedDomains != null ? whitelistedDomains .size() : 0) + | |
| 90 '}'; | |
| 91 } | |
| 92 } | |
| OLD | NEW |