| 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; | |
| 19 | |
| 20 public class AppInfo | |
| 21 { | |
| 22 public final String version; | |
| 23 public final String name; | |
| 24 public final String application; | |
| 25 public final String applicationVersion; | |
| 26 public final String locale; | |
| 27 public final boolean developmentBuild; | |
| 28 | |
| 29 private AppInfo(final String version, final String name, final String applicat
ion, final String applicationVersion, | |
| 30 final String locale, final boolean developmentBuild) | |
| 31 { | |
| 32 this.version = version; | |
| 33 this.name = name; | |
| 34 this.application = application; | |
| 35 this.applicationVersion = applicationVersion; | |
| 36 this.locale = locale; | |
| 37 this.developmentBuild = developmentBuild; | |
| 38 } | |
| 39 | |
| 40 public static Builder builder() | |
| 41 { | |
| 42 return new Builder(); | |
| 43 } | |
| 44 | |
| 45 public static class Builder | |
| 46 { | |
| 47 private String version = "0"; | |
| 48 private String name = "adblockplusandroid"; | |
| 49 private String application = "android"; | |
| 50 private String applicationVersion = "0"; | |
| 51 private String locale = "en_US"; | |
| 52 private boolean developmentBuild = false; | |
| 53 | |
| 54 private Builder() | |
| 55 { | |
| 56 | |
| 57 } | |
| 58 | |
| 59 public Builder setVersion(final String version) | |
| 60 { | |
| 61 this.version = version; | |
| 62 return this; | |
| 63 } | |
| 64 | |
| 65 public Builder setName(final String name) | |
| 66 { | |
| 67 this.name = name; | |
| 68 return this; | |
| 69 } | |
| 70 | |
| 71 public Builder setApplication(final String application) | |
| 72 { | |
| 73 this.application = application; | |
| 74 return this; | |
| 75 } | |
| 76 | |
| 77 public Builder setApplicationVersion(final String applicationVersion) | |
| 78 { | |
| 79 this.applicationVersion = applicationVersion; | |
| 80 return this; | |
| 81 } | |
| 82 | |
| 83 public Builder setLocale(final String locale) | |
| 84 { | |
| 85 this.locale = locale; | |
| 86 return this; | |
| 87 } | |
| 88 | |
| 89 public Builder setDevelopmentBuild(final boolean developmentBuild) | |
| 90 { | |
| 91 this.developmentBuild = developmentBuild; | |
| 92 return this; | |
| 93 } | |
| 94 | |
| 95 public AppInfo build() | |
| 96 { | |
| 97 return new AppInfo(this.version, this.name, this.application, this.applica
tionVersion, this.locale, this.developmentBuild); | |
| 98 } | |
| 99 } | |
| 100 } | |
| OLD | NEW |