Package org.apache.hadoop.util
Class Options
java.lang.Object
org.apache.hadoop.util.Options
This class allows generic access to variable length type-safe parameter
lists.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <base,T extends base>
TFind the first option of the required class.static <T> T[]prependOptions(T[] oldOpts, T... newOpts) Prepend some new options to the old options
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
getOption
Find the first option of the required class.- Type Parameters:
T- the static class to findbase- the parent class of the array- Parameters:
cls- the dynamic class to findopts- the list of options to look through- Returns:
- the first option that matches
- Throws:
IOException- raised on errors performing I/O.
-
prependOptions
public static <T> T[] prependOptions(T[] oldOpts, T... newOpts) Prepend some new options to the old options- Type Parameters:
T- the type of options- Parameters:
oldOpts- the old optionsnewOpts- the new options- Returns:
- a new array of options
-