Return this flag's current value.
Return this flag's current value. The default value is returned when the flag has not otherwise been set.
String representation of this flag's default value
Get the value if it has been set.
Get the value if it has been set.
if no user-defined value has been set, None
will be
returned even when a default value is supplied.
Get the *unparsed* (as string) value if it has been set.
Get the *unparsed* (as string) value if it has been set.
if no user-defined value has been set, None
will be returned even when a default value
is supplied.
Get the value if it has been set or if there is a default value supplied.
Get the value if it has been set or if there is a default value supplied.
Flag.get and Flag.isDefined if you are interested in determining if there is a supplied value.
Get the *unparsed* (as string) value if it has been set or if there is a default value supplied.
Get the *unparsed* (as string) value if it has been set or if there is a default value supplied.
Flag.get and Flag.isDefined if you are interested in determining if there is a supplied value.
True if the flag has been set.
True if the flag has been set.
if no user-defined value has been set, false
will be
returned even when a default value is supplied.
Override the value of this flag with t
, only for the scope of the current
com.twitter.util.Local for the given function f
.
Override the value of this flag with t
, only for the scope of the current
com.twitter.util.Local for the given function f
.
Unset the value of this flag, such that isDefined will return false
,
only for the scope of the current com.twitter.util.Local for the
given function f
.
Unset the value of this flag, such that isDefined will return false
,
only for the scope of the current com.twitter.util.Local for the
given function f
.
Override the value of this flag with arg
parsed to this Flag's T type,
only for the scope of the current com.twitter.util.Local for the given function f
.
Override the value of this flag with arg
parsed to this Flag's T type,
only for the scope of the current com.twitter.util.Local for the given function f
.
Indicates whether or not the flag is valid without an argument.
Parse this flag with no argument.
Parse value raw
into this flag.
Reset this flag's value
String representation of this flag in -foo='bar' format, suitable for being used on the command line.
String representation of this flag in -foo='bar' format, suitable for being used on the command line.
A single command-line flag, instantiated by a com.twitter.app.Flags instance.
The current value can be extracted via apply(), get, and getWithDefault. Local-scoped modifications of their values, which can be useful for tests, can be done by calls to let and letClear.
Using a
String
-typed Flag,myFlag
, which is unset and has a default value of "DEFAULT" as an example:com.twitter.app.GlobalFlag
com.twitter.app.Flags for information on how flags can be set by the command line.