001package org.unix4j.unix.head; 002 003import org.unix4j.unix.Head; 004 005/** 006 * Options for the {@link Head head} command with the 007 * the following options: 008 * <p> 009 * <table> 010 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -c}</td><td> </td><td nowrap="nowrap">{@code --chars}</td><td> </td><td>The {@code count} argument is in units of characters instead of 011 lines. Starts from 1 and includes line ending characters.</td></tr> 012 * <tr valign="top"><td width="10px"></td><td nowrap="nowrap">{@code -q}</td><td> </td><td nowrap="nowrap">{@code --suppressHeaders}</td><td> </td><td>Suppresses printing of headers when multiple files are being 013 examined.</td></tr> 014 * </table> 015 * <p> 016 * This class serves as entry point to every possible set of {@code head} 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 * head(Head.Options.c, ...); 022 * head(Head.Options.c.q, ...); 023 * </pre> 024 */ 025public final class HeadOptionSets { 026 /** 027 * The singleton instance. 028 */ 029 public static final HeadOptionSets INSTANCE = new HeadOptionSets(); 030 031 /** 032 * Option {@code "-c"}: The {@code count} argument is in units of characters instead of 033 lines. Starts from 1 and includes line ending characters. 034 * <p> 035 * The option {@code "-c"} is equivalent to the {@code "--}{@link #chars chars}{@code "} option. 036 */ 037 public final HeadOptionSet_cq c = HeadOptionSet_cq.Active_c; 038 /** 039 * Option {@code "--chars"}: The {@code count} argument is in units of characters instead of 040 lines. Starts from 1 and includes line ending characters. 041 * <p> 042 * The option {@code "--chars"} is equivalent to the {@code "-}{@link #c c}{@code "} option. 043 */ 044 public final HeadOptionSet_cq chars = HeadOptionSet_cq.Active_c_long; 045 /** 046 * Option {@code "-q"}: Suppresses printing of headers when multiple files are being 047 examined. 048 * <p> 049 * The option {@code "-q"} is equivalent to the {@code "--}{@link #suppressHeaders suppressHeaders}{@code "} option. 050 */ 051 public final HeadOptionSet_cq q = HeadOptionSet_cq.Active_q; 052 /** 053 * Option {@code "--suppressHeaders"}: Suppresses printing of headers when multiple files are being 054 examined. 055 * <p> 056 * The option {@code "--suppressHeaders"} is equivalent to the {@code "-}{@link #q q}{@code "} option. 057 */ 058 public final HeadOptionSet_cq suppressHeaders = HeadOptionSet_cq.Active_q_long; 059 060}