public final class Variable
extends java.lang.Object
| Constructor and Description |
|---|
Variable(@NotEmpty java.lang.String name,
@NotEmpty java.lang.String value)
Constructor with name and value.
|
Variable(@NotEmpty java.lang.String name,
@NotNull java.net.URL url,
@NotEmpty java.lang.String encoding)
Constructor with name and URL.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getEncoding()
Returns the encoding to use for reading the value from the URL.
|
java.lang.String |
getEncodingOrDefault()
Returns the encoding to use for reading the value from the URL.
|
@NotEmpty java.lang.String |
getName()
Returns the name.
|
java.net.URL |
getURL()
Returns the URL.
|
java.lang.String |
getValue()
Returns the value.
|
int |
hashCode() |
void |
init(java.util.Map<java.lang.String,java.lang.String> vars)
Replaces variables (if defined) in the value.
|
java.lang.String |
toString() |
public Variable(@NotEmpty
@NotEmpty java.lang.String name,
@NotEmpty
@NotEmpty java.lang.String value)
name - Name to set.value - Value to set.public Variable(@NotEmpty
@NotEmpty java.lang.String name,
@NotNull
@NotNull java.net.URL url,
@NotEmpty
@NotEmpty java.lang.String encoding)
name - Name to set.url - URL that references a text resource.encoding - Encoding of the text resource the URL points to.@NotEmpty public final @NotEmpty java.lang.String getName()
public final java.lang.String getValue()
null.public final java.net.URL getURL()
null.public final java.lang.String getEncoding()
null.public final java.lang.String getEncodingOrDefault()
null.public final void init(@Nullable
java.util.Map<java.lang.String,java.lang.String> vars)
vars - Variables to use.public final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 fuin.org (Germany). All Rights Reserved.