| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | |
| 3 * Copyright (C) 2006-present 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, | |
| 30 final String application, final String applicationVersion, | |
| 31 final String locale, final boolean developmentBuild) | |
| 32 { | |
| 33 this.version = version; | |
| 34 this.name = name; | |
| 35 this.application = application; | |
| 36 this.applicationVersion = applicationVersion; | |
| 37 this.locale = locale; | |
| 38 this.developmentBuild = developmentBuild; | |
| 39 } | |
| 40 | |
| 41 public static Builder builder() | |
| 42 { | |
| 43 return new Builder(); | |
| 44 } | |
| 45 | |
| 46 public static class Builder | |
| 47 { | |
| 48 private String version = "1.0"; | |
| 49 private String name = "libadblockplus-android"; | |
| 50 private String application = "android"; | |
| 51 private String applicationVersion = "0"; | |
| 52 private String locale = "en_US"; | |
| 53 private boolean developmentBuild = false; | |
| 54 | |
| 55 private Builder() | |
| 56 { | |
| 57 | |
| 58 } | |
| 59 | |
| 60 public Builder setVersion(final String version) | |
| 61 { | |
| 62 this.version = version; | |
| 63 return this; | |
| 64 } | |
| 65 | |
| 66 public Builder setName(final String name) | |
| 67 { | |
| 68 this.name = name; | |
| 69 return this; | |
| 70 } | |
| 71 | |
| 72 public Builder setApplication(final String application) | |
| 73 { | |
| 74 this.application = application; | |
| 75 return this; | |
| 76 } | |
| 77 | |
| 78 public Builder setApplicationVersion(final String applicationVersion) | |
| 79 { | |
| 80 this.applicationVersion = applicationVersion; | |
| 81 return this; | |
| 82 } | |
| 83 | |
| 84 public Builder setLocale(final String locale) | |
| 85 { | |
| 86 this.locale = locale; | |
| 87 return this; | |
| 88 } | |
| 89 | |
| 90 public Builder setDevelopmentBuild(final boolean developmentBuild) | |
| 91 { | |
| 92 this.developmentBuild = developmentBuild; | |
| 93 return this; | |
| 94 } | |
| 95 | |
| 96 public AppInfo build() | |
| 97 { | |
| 98 return new AppInfo(this.version, this.name, this.application, this.applica
tionVersion, this.locale, this.developmentBuild); | |
| 99 } | |
| 100 } | |
| 101 } | |
| OLD | NEW |