001package org.unix4j.unix.cat;
002
003import org.unix4j.unix.Cat;
004
005/**
006 * Options for the {@link Cat cat} command with the 
007 * the following options: 
008 * <p>
009 * <table>
010 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -b}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --numberNonBlankLines}</td><td>&nbsp;</td><td>Number the non-blank output lines, starting at 1.</td></tr>
011 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -n}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --numberLines}</td><td>&nbsp;</td><td>Number the output lines, starting at 1.</td></tr>
012 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -s}</td><td>&nbsp;&nbsp;</td><td nowrap="nowrap">{@code --squeezeEmptyLines}</td><td>&nbsp;</td><td>Squeeze multiple adjacent empty lines, causing the output to be 
013                        single spaced.</td></tr>
014 * </table>
015 * <p>
016 * This class serves as entry point to every possible set of {@code cat} options
017 * defined as an enum constant. With this explicit expansion of all possible 
018 * option combinations, options can be passed to the command in a very compact 
019 * form, such as:
020 * <pre>
021 * cat(Cat.Options.b, ...);
022 * cat(Cat.Options.b.n, ...);
023 * ...
024 * cat(Cat.Options.b.n.s, ...);
025 * </pre>
026 */
027public final class CatOptionSets {
028        /**
029         * The singleton instance.
030         */
031        public static final CatOptionSets INSTANCE = new CatOptionSets();
032        
033        /**
034         * Option {@code "-n"}: Number the output lines, starting at 1.
035         * <p>
036         * The option {@code "-n"} is equivalent to the {@code "--}{@link #numberLines numberLines}{@code "} option.
037         */
038        public final CatOptionSet_ns n = CatOptionSet_ns.Active_n;  
039        /**
040         * Option {@code "--numberLines"}: Number the output lines, starting at 1.
041         * <p>
042         * The option {@code "--numberLines"} is equivalent to the {@code "-}{@link #n n}{@code "} option.
043         */
044        public final CatOptionSet_ns numberLines = CatOptionSet_ns.Active_n_long;  
045        /**
046         * Option {@code "-b"}: Number the non-blank output lines, starting at 1.
047         * <p>
048         * The option {@code "-b"} is equivalent to the {@code "--}{@link #numberNonBlankLines numberNonBlankLines}{@code "} option.
049         */
050        public final CatOptionSet_bs b = CatOptionSet_bs.Active_b;  
051        /**
052         * Option {@code "--numberNonBlankLines"}: Number the non-blank output lines, starting at 1.
053         * <p>
054         * The option {@code "--numberNonBlankLines"} is equivalent to the {@code "-}{@link #b b}{@code "} option.
055         */
056        public final CatOptionSet_bs numberNonBlankLines = CatOptionSet_bs.Active_b_long;  
057        /**
058         * Option {@code "-s"}: Squeeze multiple adjacent empty lines, causing the output to be 
059                        single spaced.
060         * <p>
061         * The option {@code "-s"} is equivalent to the {@code "--}{@link #squeezeEmptyLines squeezeEmptyLines}{@code "} option.
062         */
063        public final CatOptionSet_bns s = CatOptionSet_bns.Active_s;  
064        /**
065         * Option {@code "--squeezeEmptyLines"}: Squeeze multiple adjacent empty lines, causing the output to be 
066                        single spaced.
067         * <p>
068         * The option {@code "--squeezeEmptyLines"} is equivalent to the {@code "-}{@link #s s}{@code "} option.
069         */
070        public final CatOptionSet_bns squeezeEmptyLines = CatOptionSet_bns.Active_s_long;  
071        
072}