public static class OpenSshConfigFile.HostEntry extends Object
Constructor and Description |
---|
HostEntry() |
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
getMultiValuedOptions()
Retrieves an unmodifiable map of all multi-valued options, with
case-insensitive lookup by keys.
|
Map<String,String> |
getOptions()
Retrieves an unmodifiable map of all single-valued options, with
case-insensitive lookup by keys.
|
String |
getValue(String key)
Retrieves the value of a single-valued key, or the first is the key
has multiple values.
|
List<String> |
getValues(String key)
Retrieves the values of a multi or list-valued key.
|
static boolean |
isListKey(String key)
Does the key take a whitespace-separated list of values?
|
void |
setValue(String key,
List<String> values)
Sets the values of a multi- or list-valued key.
|
void |
setValue(String key,
String value)
Sets the value of a single-valued key if it not set yet, or adds a
value to a multi-valued key.
|
String |
toString() |
public String getValue(String key)
getValue("HostName") == getValue("HOSTNAME")
.key
- to get the value ofnull
if nonepublic List<String> getValues(String key)
getValue("HostName") == getValue("HOSTNAME")
.key
- to get the values ofpublic void setValue(String key, String value)
null
, the key is
removed altogether, whether it is single-, list-, or multi-valued.key
- to modifyvalue
- to set or addpublic void setValue(String key, List<String> values)
key
- to setvalues
- a non-empty list of valuespublic static boolean isListKey(String key)
key
- to checktrue
if the key is a list-valued key.@NonNull public Map<String,String> getOptions()
@NonNull public Map<String,List<String>> getMultiValuedOptions()
Copyright © 2020 Eclipse JGit Project. All rights reserved.