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

org.unix4j.unix.cat.CatOptionSets Maven / Gradle / Ivy

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

import org.unix4j.unix.Cat;

/**
 * Options for the {@link Cat cat} command with the 
 * the following options: 
 * 

*

* * * *
{@code -b}  {@code --numberNonBlankLines} Number the non-blank output lines, starting at 1.
{@code -n}  {@code --numberLines} Number the output lines, starting at 1.
{@code -s}  {@code --squeezeEmptyLines} Squeeze multiple adjacent empty lines, causing the output to be single spaced.
*

* This class serves as entry point to every possible set of {@code cat} 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: *

 * cat(Cat.Options.b, ...);
 * cat(Cat.Options.b.n, ...);
 * ...
 * cat(Cat.Options.b.n.s, ...);
 * 
*/ public final class CatOptionSets { /** * The singleton instance. */ public static final CatOptionSets INSTANCE = new CatOptionSets(); /** * Option {@code "-n"}: Number the output lines, starting at 1. *

* The option {@code "-n"} is equivalent to the {@code "--}{@link #numberLines numberLines}{@code "} option. */ public final CatOptionSet_ns n = CatOptionSet_ns.Active_n; /** * Option {@code "--numberLines"}: Number the output lines, starting at 1. *

* The option {@code "--numberLines"} is equivalent to the {@code "-}{@link #n n}{@code "} option. */ public final CatOptionSet_ns numberLines = CatOptionSet_ns.Active_n_long; /** * Option {@code "-b"}: Number the non-blank output lines, starting at 1. *

* The option {@code "-b"} is equivalent to the {@code "--}{@link #numberNonBlankLines numberNonBlankLines}{@code "} option. */ public final CatOptionSet_bs b = CatOptionSet_bs.Active_b; /** * Option {@code "--numberNonBlankLines"}: Number the non-blank output lines, starting at 1. *

* The option {@code "--numberNonBlankLines"} is equivalent to the {@code "-}{@link #b b}{@code "} option. */ public final CatOptionSet_bs numberNonBlankLines = CatOptionSet_bs.Active_b_long; /** * Option {@code "-s"}: Squeeze multiple adjacent empty lines, causing the output to be single spaced. *

* The option {@code "-s"} is equivalent to the {@code "--}{@link #squeezeEmptyLines squeezeEmptyLines}{@code "} option. */ public final CatOptionSet_bns s = CatOptionSet_bns.Active_s; /** * Option {@code "--squeezeEmptyLines"}: Squeeze multiple adjacent empty lines, causing the output to be single spaced. *

* The option {@code "--squeezeEmptyLines"} is equivalent to the {@code "-}{@link #s s}{@code "} option. */ public final CatOptionSet_bns squeezeEmptyLines = CatOptionSet_bns.Active_s_long; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy