All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unix4j.unix.wc.WcOptionSets Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
package org.unix4j.unix.wc;

import org.unix4j.unix.Wc;

/**
 * Options for the {@link Wc wc} command with the 
 * the following options: 
 * 

*

* * * *
{@code -l}  {@code --lines} Executes a count of lines and writes this count to the output.
{@code -w}  {@code --words} Executes a count of words and writes this count to the output. A word is a non-zero-length string of characters delimited by white space as defined by {@link Character#isWhitespace(char)}.
{@code -m}  {@code --chars} Executes a count of chars and writes this count to the output.
*

* This class serves as entry point to every possible set of {@code wc} options * defined as an enum constant. With this explicit expansion of all possible * option combinations, options can be passed to the command in a very compact * form, such as: *

 * wc(Wc.Options.l, ...);
 * wc(Wc.Options.l.w, ...);
 * ...
 * wc(Wc.Options.l.w.m, ...);
 * 
*/ public final class WcOptionSets { /** * The singleton instance. */ public static final WcOptionSets INSTANCE = new WcOptionSets(); /** * Option {@code "-m"}: Executes a count of chars and writes this count to the output. *

* The option {@code "-m"} is equivalent to the {@code "--}{@link #chars chars}{@code "} option. */ public final WcOptionSet_lmw m = WcOptionSet_lmw.Active_m; /** * Option {@code "--chars"}: Executes a count of chars and writes this count to the output. *

* The option {@code "--chars"} is equivalent to the {@code "-}{@link #m m}{@code "} option. */ public final WcOptionSet_lmw chars = WcOptionSet_lmw.Active_m_long; /** * Option {@code "-l"}: Executes a count of lines and writes this count to the output. *

* The option {@code "-l"} is equivalent to the {@code "--}{@link #lines lines}{@code "} option. */ public final WcOptionSet_lmw l = WcOptionSet_lmw.Active_l; /** * Option {@code "--lines"}: Executes a count of lines and writes this count to the output. *

* The option {@code "--lines"} is equivalent to the {@code "-}{@link #l l}{@code "} option. */ public final WcOptionSet_lmw lines = WcOptionSet_lmw.Active_l_long; /** * Option {@code "-w"}: Executes a count of words and writes this count to the output. A word is a non-zero-length string of characters delimited by white space as defined by {@link Character#isWhitespace(char)}. *

* The option {@code "-w"} is equivalent to the {@code "--}{@link #words words}{@code "} option. */ public final WcOptionSet_lmw w = WcOptionSet_lmw.Active_w; /** * Option {@code "--words"}: Executes a count of words and writes this count to the output. A word is a non-zero-length string of characters delimited by white space as defined by {@link Character#isWhitespace(char)}. *

* The option {@code "--words"} is equivalent to the {@code "-}{@link #w w}{@code "} option. */ public final WcOptionSet_lmw words = WcOptionSet_lmw.Active_w_long; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy