MCPcopy Create free account
hub / github.com/Qihoo360/poseidon / get

Method get

builder/index/src/main/java/util/IniParser.java:256–267  ·  view source on GitHub ↗

Returns the value of a given option in a given section or null if either the section or the option don't exist. If a common section was defined options are also looked up there if they're not present in the specific section. @param section the section's name @param option the option's name @return

(String section, String option)

Source from the content-addressed store, hash-verified

254 * @throws NullPointerException any of the arguments is <code>null</code>
255 */
256 public String get(String section, String option) {
257 if (hasSection(section)) {
258 Section sect = getSection(section);
259 if (sect.hasOption(option)) {
260 return sect.get(option);
261 }
262 if (this.commonName != null) {
263 return getSection(this.commonName).get(option);
264 }
265 }
266 return null;
267 }
268
269 /**
270 * Sets the value of an option in a section, if the option exist, otherwise

Callers 15

handleMethod · 0.45
CopyPartiallyMethod · 0.45
runMethod · 0.45
setupMethod · 0.45
getDocIdsMethod · 0.45
getDocIdsOrBuilderMethod · 0.45
writeToMethod · 0.45
getSerializedSizeMethod · 0.45
getDocIdsMethod · 0.45
getDocIdsOrBuilderMethod · 0.45
getDocListMethod · 0.45
getRowListMethod · 0.45

Calls 4

hasSectionMethod · 0.95
getSectionMethod · 0.95
hasOptionMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected