/discover_by_testing_fixed.java Secret
Created
June 12, 2022 16:33
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Configuration { | |
private final String agent; | |
private final String header; | |
private final String version; | |
public Configuration(final Storage storage) { | |
this.agent = storage.get(KEY_AGENT); | |
this.version = storage.get(KEY_VERSION); | |
this.header = storage.get(KEY_HEADER); | |
} | |
public boolean isValid() { | |
if (agent.length() == 0) return false; | |
if (version.length() == 0) return false; | |
return header.length() != 0; | |
} | |
public String getAgent() { | |
return agent; | |
} | |
public String getHeader() { | |
return header + "/" + VERSION_PREFIX + this.version; | |
} | |
public String getVersion() { | |
return version; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment