org.unix4j.unix.uniq.UniqOptionSets Maven / Gradle / Ivy
package org.unix4j.unix.uniq;
import org.unix4j.unix.Uniq;
/**
* Options for the {@link Uniq uniq} command with the
* the following options:
*
*
* {@code -c} {@code --count} Precedes each output line with a count of the number of times the
line occurred in the input.
* {@code -d} {@code --duplicatedOnly} Suppresses the writing of lines that are not repeated in the input.
* {@code -u} {@code --uniqueOnly} Suppresses the writing of lines that are repeated in the input.
* {@code -g} {@code --global} Suppresses repeated lines globally, that is, if lines are
non-adjacent. This option guarantees unique output lines even if the
input lines are not sorted.
*
*
* This class serves as entry point to every possible set of {@code uniq} 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:
*
* uniq(Uniq.Options.c, ...);
* uniq(Uniq.Options.c.d, ...);
* ...
* uniq(Uniq.Options.c.d.u.g, ...);
*
*/
public final class UniqOptionSets {
/**
* The singleton instance.
*/
public static final UniqOptionSets INSTANCE = new UniqOptionSets();
/**
* Option {@code "-c"}: Precedes each output line with a count of the number of times the
line occurred in the input.
*
* The option {@code "-c"} is equivalent to the {@code "--}{@link #count count}{@code "} option.
*/
public final UniqOptionSet_cg c = UniqOptionSet_cg.Active_c;
/**
* Option {@code "--count"}: Precedes each output line with a count of the number of times the
line occurred in the input.
*
* The option {@code "--count"} is equivalent to the {@code "-}{@link #c c}{@code "} option.
*/
public final UniqOptionSet_cg count = UniqOptionSet_cg.Active_c_long;
/**
* Option {@code "-d"}: Suppresses the writing of lines that are not repeated in the input.
*
* The option {@code "-d"} is equivalent to the {@code "--}{@link #duplicatedOnly duplicatedOnly}{@code "} option.
*/
public final UniqOptionSet_dg d = UniqOptionSet_dg.Active_d;
/**
* Option {@code "--duplicatedOnly"}: Suppresses the writing of lines that are not repeated in the input.
*
* The option {@code "--duplicatedOnly"} is equivalent to the {@code "-}{@link #d d}{@code "} option.
*/
public final UniqOptionSet_dg duplicatedOnly = UniqOptionSet_dg.Active_d_long;
/**
* Option {@code "-g"}: Suppresses repeated lines globally, that is, if lines are
non-adjacent. This option guarantees unique output lines even if the
input lines are not sorted.
*
* The option {@code "-g"} is equivalent to the {@code "--}{@link #global global}{@code "} option.
*/
public final UniqOptionSet_cdgu g = UniqOptionSet_cdgu.Active_g;
/**
* Option {@code "--global"}: Suppresses repeated lines globally, that is, if lines are
non-adjacent. This option guarantees unique output lines even if the
input lines are not sorted.
*
* The option {@code "--global"} is equivalent to the {@code "-}{@link #g g}{@code "} option.
*/
public final UniqOptionSet_cdgu global = UniqOptionSet_cdgu.Active_g_long;
/**
* Option {@code "-u"}: Suppresses the writing of lines that are repeated in the input.
*
* The option {@code "-u"} is equivalent to the {@code "--}{@link #uniqueOnly uniqueOnly}{@code "} option.
*/
public final UniqOptionSet_gu u = UniqOptionSet_gu.Active_u;
/**
* Option {@code "--uniqueOnly"}: Suppresses the writing of lines that are repeated in the input.
*
* The option {@code "--uniqueOnly"} is equivalent to the {@code "-}{@link #u u}{@code "} option.
*/
public final UniqOptionSet_gu uniqueOnly = UniqOptionSet_gu.Active_u_long;
}