public void applyDefaults(final char commandPrefix, final List<ICmdLineArg<?>> allKnownArgs)
    {
        for (final String argNameToReset : getValues())
        {
            if (argNameToReset == null)
                return;

            Token token = null;
            if (argNameToReset.trim().length() == 1)
                token = new Token(commandPrefix, commandPrefix + argNameToReset);
            else
                token = new Token(commandPrefix, "" + commandPrefix + commandPrefix + argNameToReset);

            final List<ICmdLineArg<?>> bestArgs = new ArrayList<>();
            CmdLine.matchingArgs(bestArgs, allKnownArgs, token, true);
            if (bestArgs.isEmpty())
                return;

            final ICmdLineArg<?> target = bestArgs.get(0);
            target.useDefaults();
        }
    }
public void applyDefaults ( final char commandPrefix , final List < ICmdLineArg < ? > > allKnownArgs ) { for ( final String argNameToReset : getValues ( ) ) { if ( argNameToReset == null ) return ; Token token = null ; if ( argNameToReset . trim ( ) . length ( ) == 1 ) token = new Token ( commandPrefix , commandPrefix + argNameToReset ) ; else token = new Token ( commandPrefix , "" + commandPrefix + commandPrefix + argNameToReset ) ; final List < ICmdLineArg < ? > > bestArgs = new ArrayList < > ( ) ; CmdLine . matchingArgs ( bestArgs , allKnownArgs , token , true ) ; if ( bestArgs . isEmpty ( ) ) return ; final ICmdLineArg < ? > target = bestArgs . get ( 0 ) ; target . useDefaults ( ) ; } }
<p>
applyDefaults.
</p>

@param commandPrefix a char.
@param allKnownArgs a {@link java.util.List} object.