OLD | NEW |
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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 private final static String KEY_TITLE = "title"; | 26 private final static String KEY_TITLE = "title"; |
27 private final static String KEY_URL = "url"; | 27 private final static String KEY_URL = "url"; |
28 private final static String KEY_AUTHOR = "author"; | 28 private final static String KEY_AUTHOR = "author"; |
29 private final static String KEY_PREFIXES = "prefixes"; | 29 private final static String KEY_PREFIXES = "prefixes"; |
30 private final static String KEY_SPECIALIZATION = "specialization"; | 30 private final static String KEY_SPECIALIZATION = "specialization"; |
31 private final static String KEY_HOMEPAGE = "homepage"; | 31 private final static String KEY_HOMEPAGE = "homepage"; |
32 private final static String KEY_TYPE = "type"; | 32 private final static String KEY_TYPE = "type"; |
33 private final static String KEY_COMPLETE = "complete"; | 33 private final static String KEY_COMPLETE = "complete"; |
34 | 34 |
35 DefaultSubscriptionInfo parent = null; | 35 DefaultSubscriptionInfo parent = null; |
36 final List<DefaultSubscriptionInfo> variants = new ArrayList<DefaultSubscripti
onInfo>(); | 36 final List<DefaultSubscriptionInfo> variants = new ArrayList<>(); |
37 final List<DefaultSubscriptionInfo> supplements = new ArrayList<DefaultSubscri
ptionInfo>(); | 37 final List<DefaultSubscriptionInfo> supplements = new ArrayList<>(); |
38 final HashMap<String, String> attributes = new HashMap<String, String>(); | 38 final HashMap<String, String> attributes = new HashMap<>(); |
39 | 39 |
40 private String getValue(final String key) | 40 private String getValue(final String key) |
41 { | 41 { |
42 final String value = this.attributes.get(key); | 42 final String value = this.attributes.get(key); |
43 return value != null ? value : ""; | 43 return value != null ? value : ""; |
44 } | 44 } |
45 | 45 |
46 public String getTitle() | 46 public String getTitle() |
47 { | 47 { |
48 return this.getValue(KEY_TITLE); | 48 return this.getValue(KEY_TITLE); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 return this.getUrl().compareTo(o.getUrl()); | 94 return this.getUrl().compareTo(o.getUrl()); |
95 } | 95 } |
96 | 96 |
97 @Override | 97 @Override |
98 public String toString() | 98 public String toString() |
99 { | 99 { |
100 return this.getTitle() + ": " + this.getUrl(); | 100 return this.getTitle() + ": " + this.getUrl(); |
101 } | 101 } |
102 } | 102 } |
OLD | NEW |