001package org.unix4j.unix; 002 003import org.unix4j.builder.DefaultCommandBuilder; 004import org.unix4j.command.Command; 005import org.unix4j.command.NoOp; 006import org.unix4j.context.DefaultExecutionContext; 007import org.unix4j.context.ExecutionContextFactory; 008import org.unix4j.operation.LineOperation; 009 010import org.unix4j.unix.Cat; 011import org.unix4j.unix.cat.CatOptions; 012import org.unix4j.unix.Cd; 013import org.unix4j.unix.Cut; 014import org.unix4j.unix.cut.CutOptions; 015import org.unix4j.unix.Echo; 016import org.unix4j.unix.echo.EchoOptions; 017import org.unix4j.unix.Find; 018import org.unix4j.unix.find.FindOptions; 019import org.unix4j.unix.From; 020import org.unix4j.unix.Grep; 021import org.unix4j.unix.grep.GrepOptions; 022import org.unix4j.unix.Head; 023import org.unix4j.unix.head.HeadOptions; 024import org.unix4j.unix.Ls; 025import org.unix4j.unix.ls.LsOptions; 026import org.unix4j.unix.Sed; 027import org.unix4j.unix.sed.SedOptions; 028import org.unix4j.unix.Sort; 029import org.unix4j.unix.sort.SortOptions; 030import org.unix4j.unix.Tail; 031import org.unix4j.unix.tail.TailOptions; 032import org.unix4j.unix.Uniq; 033import org.unix4j.unix.uniq.UniqOptions; 034import org.unix4j.unix.Wc; 035import org.unix4j.unix.wc.WcOptions; 036import org.unix4j.unix.Xargs; 037import org.unix4j.unix.xargs.XargsOptions; 038 039/** 040 * Default implementation for {@link Unix4jCommandBuilder}. Application code 041 * does usually not directly refer to this class but uses it indirectly through 042 * the static methods in {@link org.unix4j.Unix4j Unix4j}. 043 */ 044public class DefaultUnix4jCommandBuilder extends DefaultCommandBuilder implements Unix4jCommandBuilder { 045 046 /** 047 * Default constructor initialized with a {@link NoOp} command which will be 048 * replaced by the first command joined to this builder's command chain. 049 * Uses a {@link DefaultExecutionContext} to execute commands. 050 */ 051 public DefaultUnix4jCommandBuilder() { 052 super(); 053 } 054 055 /** 056 * Constructor using the specified factory to create contexts for command 057 * execution. The builder is initialized with a {@link NoOp} command which 058 * will be replaced by the first command joined to this builder's command 059 * chain. 060 * 061 * @param contextFactory 062 * the factory used to create execution contexts that are passed 063 * to the execute method when a command is executed 064 */ 065 public DefaultUnix4jCommandBuilder(ExecutionContextFactory contextFactory) { 066 super(contextFactory); 067 } 068 069 070 /* ------------------ cat ------------------ */ 071 @Override 072 public Unix4jCommandBuilder cat() { 073 join(Cat.Factory.cat()); 074 return this; 075 } 076 @Override 077 public Unix4jCommandBuilder cat(String... args) { 078 join(Cat.Factory.cat(args)); 079 return this; 080 } 081 @Override 082 public Unix4jCommandBuilder cat(java.io.File... files) { 083 join(Cat.Factory.cat(files)); 084 return this; 085 } 086 @Override 087 public Unix4jCommandBuilder cat(org.unix4j.io.Input... inputs) { 088 join(Cat.Factory.cat(inputs)); 089 return this; 090 } 091 @Override 092 public Unix4jCommandBuilder cat(CatOptions options) { 093 join(Cat.Factory.cat(options)); 094 return this; 095 } 096 @Override 097 public Unix4jCommandBuilder cat(CatOptions options, java.io.File... files) { 098 join(Cat.Factory.cat(options, files)); 099 return this; 100 } 101 @Override 102 public Unix4jCommandBuilder cat(CatOptions options, String... paths) { 103 join(Cat.Factory.cat(options, paths)); 104 return this; 105 } 106 @Override 107 public Unix4jCommandBuilder cat(CatOptions options, org.unix4j.io.Input... inputs) { 108 join(Cat.Factory.cat(options, inputs)); 109 return this; 110 } 111 112 /* ------------------ cd ------------------ */ 113 @Override 114 public Unix4jCommandBuilder cd() { 115 join(Cd.Factory.cd()); 116 return this; 117 } 118 @Override 119 public Unix4jCommandBuilder cd(java.io.File file) { 120 join(Cd.Factory.cd(file)); 121 return this; 122 } 123 @Override 124 public Unix4jCommandBuilder cd(String path) { 125 join(Cd.Factory.cd(path)); 126 return this; 127 } 128 129 /* ------------------ cut ------------------ */ 130 @Override 131 public Unix4jCommandBuilder cut(String... args) { 132 join(Cut.Factory.cut(args)); 133 return this; 134 } 135 @Override 136 public Unix4jCommandBuilder cut(CutOptions options, org.unix4j.util.Range range) { 137 join(Cut.Factory.cut(options, range)); 138 return this; 139 } 140 @Override 141 public Unix4jCommandBuilder cut(CutOptions options, int... indexes) { 142 join(Cut.Factory.cut(options, indexes)); 143 return this; 144 } 145 @Override 146 public Unix4jCommandBuilder cut(CutOptions options, String delimiter, org.unix4j.util.Range range) { 147 join(Cut.Factory.cut(options, delimiter, range)); 148 return this; 149 } 150 @Override 151 public Unix4jCommandBuilder cut(CutOptions options, String delimiter, int... indexes) { 152 join(Cut.Factory.cut(options, delimiter, indexes)); 153 return this; 154 } 155 @Override 156 public Unix4jCommandBuilder cut(CutOptions options, String delimiter, char outputDelimiter, org.unix4j.util.Range range) { 157 join(Cut.Factory.cut(options, delimiter, outputDelimiter, range)); 158 return this; 159 } 160 @Override 161 public Unix4jCommandBuilder cut(CutOptions options, String delimiter, char outputDelimiter, int... indexes) { 162 join(Cut.Factory.cut(options, delimiter, outputDelimiter, indexes)); 163 return this; 164 } 165 166 /* ------------------ echo ------------------ */ 167 @Override 168 public Unix4jCommandBuilder echo(String... args) { 169 join(Echo.Factory.echo(args)); 170 return this; 171 } 172 @Override 173 public Unix4jCommandBuilder echo(EchoOptions options, String string) { 174 join(Echo.Factory.echo(options, string)); 175 return this; 176 } 177 @Override 178 public Unix4jCommandBuilder echo(EchoOptions options, String... strings) { 179 join(Echo.Factory.echo(options, strings)); 180 return this; 181 } 182 183 /* ------------------ find ------------------ */ 184 @Override 185 public Unix4jCommandBuilder find(String... args) { 186 join(Find.Factory.find(args)); 187 return this; 188 } 189 @Override 190 public Unix4jCommandBuilder find(String path) { 191 join(Find.Factory.find(path)); 192 return this; 193 } 194 @Override 195 public Unix4jCommandBuilder find(String path, String name) { 196 join(Find.Factory.find(path, name)); 197 return this; 198 } 199 @Override 200 public Unix4jCommandBuilder find(long size) { 201 join(Find.Factory.find(size)); 202 return this; 203 } 204 @Override 205 public Unix4jCommandBuilder find(String path, long size) { 206 join(Find.Factory.find(path, size)); 207 return this; 208 } 209 @Override 210 public Unix4jCommandBuilder find(long size, String name) { 211 join(Find.Factory.find(size, name)); 212 return this; 213 } 214 @Override 215 public Unix4jCommandBuilder find(String path, long size, String name) { 216 join(Find.Factory.find(path, size, name)); 217 return this; 218 } 219 @Override 220 public Unix4jCommandBuilder find(FindOptions options, String name) { 221 join(Find.Factory.find(options, name)); 222 return this; 223 } 224 @Override 225 public Unix4jCommandBuilder find(FindOptions options, String path, String name) { 226 join(Find.Factory.find(options, path, name)); 227 return this; 228 } 229 @Override 230 public Unix4jCommandBuilder find(FindOptions options, long size) { 231 join(Find.Factory.find(options, size)); 232 return this; 233 } 234 @Override 235 public Unix4jCommandBuilder find(FindOptions options, String path, long size) { 236 join(Find.Factory.find(options, path, size)); 237 return this; 238 } 239 @Override 240 public Unix4jCommandBuilder find(FindOptions options, java.util.Date time) { 241 join(Find.Factory.find(options, time)); 242 return this; 243 } 244 @Override 245 public Unix4jCommandBuilder find(FindOptions options, String path, java.util.Date time) { 246 join(Find.Factory.find(options, path, time)); 247 return this; 248 } 249 @Override 250 public Unix4jCommandBuilder find(FindOptions options, long size, String name) { 251 join(Find.Factory.find(options, size, name)); 252 return this; 253 } 254 @Override 255 public Unix4jCommandBuilder find(FindOptions options, String path, long size, String name) { 256 join(Find.Factory.find(options, path, size, name)); 257 return this; 258 } 259 @Override 260 public Unix4jCommandBuilder find(FindOptions options, java.util.Date time, String name) { 261 join(Find.Factory.find(options, time, name)); 262 return this; 263 } 264 @Override 265 public Unix4jCommandBuilder find(FindOptions options, String path, java.util.Date time, String name) { 266 join(Find.Factory.find(options, path, time, name)); 267 return this; 268 } 269 @Override 270 public Unix4jCommandBuilder find(FindOptions options, long size, java.util.Date time, String name) { 271 join(Find.Factory.find(options, size, time, name)); 272 return this; 273 } 274 @Override 275 public Unix4jCommandBuilder find(FindOptions options, String path, long size, java.util.Date time, String name) { 276 join(Find.Factory.find(options, path, size, time, name)); 277 return this; 278 } 279 280 /* ------------------ from ------------------ */ 281 @Override 282 public Unix4jCommandBuilder fromString(String string) { 283 join(From.Factory.fromString(string)); 284 return this; 285 } 286 @Override 287 public Unix4jCommandBuilder fromStrings(String... strings) { 288 join(From.Factory.fromStrings(strings)); 289 return this; 290 } 291 @Override 292 public Unix4jCommandBuilder from(Iterable<? extends String> lines) { 293 join(From.Factory.from(lines)); 294 return this; 295 } 296 @Override 297 public Unix4jCommandBuilder from(java.util.Iterator<? extends String> iterator) { 298 join(From.Factory.from(iterator)); 299 return this; 300 } 301 @Override 302 public Unix4jCommandBuilder from(java.util.stream.Stream<? extends String> stream) { 303 join(From.Factory.from(stream)); 304 return this; 305 } 306 @Override 307 public Unix4jCommandBuilder fromFile(String path) { 308 join(From.Factory.fromFile(path)); 309 return this; 310 } 311 @Override 312 public Unix4jCommandBuilder fromFile(java.io.File file) { 313 join(From.Factory.fromFile(file)); 314 return this; 315 } 316 @Override 317 public Unix4jCommandBuilder fromResource(String resource) { 318 join(From.Factory.fromResource(resource)); 319 return this; 320 } 321 @Override 322 public Unix4jCommandBuilder fromResource(Class<?> base, String resource) { 323 join(From.Factory.fromResource(base, resource)); 324 return this; 325 } 326 @Override 327 public Unix4jCommandBuilder from(java.io.InputStream in) { 328 join(From.Factory.from(in)); 329 return this; 330 } 331 @Override 332 public Unix4jCommandBuilder from(java.io.Reader reader) { 333 join(From.Factory.from(reader)); 334 return this; 335 } 336 @Override 337 public Unix4jCommandBuilder from(java.net.URL url) { 338 join(From.Factory.from(url)); 339 return this; 340 } 341 @Override 342 public Unix4jCommandBuilder from(org.unix4j.io.Input input) { 343 join(From.Factory.from(input)); 344 return this; 345 } 346 347 /* ------------------ grep ------------------ */ 348 @Override 349 public Unix4jCommandBuilder grep(String... args) { 350 join(Grep.Factory.grep(args)); 351 return this; 352 } 353 @Override 354 public Unix4jCommandBuilder grep(String regexp) { 355 join(Grep.Factory.grep(regexp)); 356 return this; 357 } 358 @Override 359 public Unix4jCommandBuilder grep(String regexp, java.io.File... files) { 360 join(Grep.Factory.grep(regexp, files)); 361 return this; 362 } 363 @Override 364 public Unix4jCommandBuilder grep(String regexp, org.unix4j.io.Input... inputs) { 365 join(Grep.Factory.grep(regexp, inputs)); 366 return this; 367 } 368 @Override 369 public Unix4jCommandBuilder grep(java.util.regex.Pattern pattern) { 370 join(Grep.Factory.grep(pattern)); 371 return this; 372 } 373 @Override 374 public Unix4jCommandBuilder grep(java.util.regex.Pattern pattern, java.io.File... files) { 375 join(Grep.Factory.grep(pattern, files)); 376 return this; 377 } 378 @Override 379 public Unix4jCommandBuilder grep(java.util.regex.Pattern pattern, String... paths) { 380 join(Grep.Factory.grep(pattern, paths)); 381 return this; 382 } 383 @Override 384 public Unix4jCommandBuilder grep(java.util.regex.Pattern pattern, org.unix4j.io.Input... inputs) { 385 join(Grep.Factory.grep(pattern, inputs)); 386 return this; 387 } 388 @Override 389 public Unix4jCommandBuilder grep(GrepOptions options, String regexp) { 390 join(Grep.Factory.grep(options, regexp)); 391 return this; 392 } 393 @Override 394 public Unix4jCommandBuilder grep(GrepOptions options, java.util.regex.Pattern pattern) { 395 join(Grep.Factory.grep(options, pattern)); 396 return this; 397 } 398 @Override 399 public Unix4jCommandBuilder grep(GrepOptions options, String regexp, java.io.File... files) { 400 join(Grep.Factory.grep(options, regexp, files)); 401 return this; 402 } 403 @Override 404 public Unix4jCommandBuilder grep(GrepOptions options, String regexp, String... paths) { 405 join(Grep.Factory.grep(options, regexp, paths)); 406 return this; 407 } 408 @Override 409 public Unix4jCommandBuilder grep(GrepOptions options, String regexp, org.unix4j.io.Input... inputs) { 410 join(Grep.Factory.grep(options, regexp, inputs)); 411 return this; 412 } 413 @Override 414 public Unix4jCommandBuilder grep(GrepOptions options, java.util.regex.Pattern pattern, java.io.File... files) { 415 join(Grep.Factory.grep(options, pattern, files)); 416 return this; 417 } 418 @Override 419 public Unix4jCommandBuilder grep(GrepOptions options, java.util.regex.Pattern pattern, String... paths) { 420 join(Grep.Factory.grep(options, pattern, paths)); 421 return this; 422 } 423 @Override 424 public Unix4jCommandBuilder grep(GrepOptions options, java.util.regex.Pattern pattern, org.unix4j.io.Input... inputs) { 425 join(Grep.Factory.grep(options, pattern, inputs)); 426 return this; 427 } 428 429 /* ------------------ head ------------------ */ 430 @Override 431 public Unix4jCommandBuilder head() { 432 join(Head.Factory.head()); 433 return this; 434 } 435 @Override 436 public Unix4jCommandBuilder head(String... args) { 437 join(Head.Factory.head(args)); 438 return this; 439 } 440 @Override 441 public Unix4jCommandBuilder head(long count) { 442 join(Head.Factory.head(count)); 443 return this; 444 } 445 @Override 446 public Unix4jCommandBuilder head(HeadOptions options, long count) { 447 join(Head.Factory.head(options, count)); 448 return this; 449 } 450 @Override 451 public Unix4jCommandBuilder head(java.io.File... files) { 452 join(Head.Factory.head(files)); 453 return this; 454 } 455 @Override 456 public Unix4jCommandBuilder head(org.unix4j.io.Input... inputs) { 457 join(Head.Factory.head(inputs)); 458 return this; 459 } 460 @Override 461 public Unix4jCommandBuilder head(long count, java.io.File... files) { 462 join(Head.Factory.head(count, files)); 463 return this; 464 } 465 @Override 466 public Unix4jCommandBuilder head(long count, String... paths) { 467 join(Head.Factory.head(count, paths)); 468 return this; 469 } 470 @Override 471 public Unix4jCommandBuilder head(long count, org.unix4j.io.Input... inputs) { 472 join(Head.Factory.head(count, inputs)); 473 return this; 474 } 475 @Override 476 public Unix4jCommandBuilder head(HeadOptions options, long count, java.io.File... files) { 477 join(Head.Factory.head(options, count, files)); 478 return this; 479 } 480 @Override 481 public Unix4jCommandBuilder head(HeadOptions options, long count, String... paths) { 482 join(Head.Factory.head(options, count, paths)); 483 return this; 484 } 485 @Override 486 public Unix4jCommandBuilder head(HeadOptions options, long count, org.unix4j.io.Input... inputs) { 487 join(Head.Factory.head(options, count, inputs)); 488 return this; 489 } 490 491 /* ------------------ ls ------------------ */ 492 @Override 493 public Unix4jCommandBuilder ls() { 494 join(Ls.Factory.ls()); 495 return this; 496 } 497 @Override 498 public Unix4jCommandBuilder ls(String... args) { 499 join(Ls.Factory.ls(args)); 500 return this; 501 } 502 @Override 503 public Unix4jCommandBuilder ls(java.io.File... files) { 504 join(Ls.Factory.ls(files)); 505 return this; 506 } 507 @Override 508 public Unix4jCommandBuilder ls(LsOptions options) { 509 join(Ls.Factory.ls(options)); 510 return this; 511 } 512 @Override 513 public Unix4jCommandBuilder ls(LsOptions options, java.io.File... files) { 514 join(Ls.Factory.ls(options, files)); 515 return this; 516 } 517 @Override 518 public Unix4jCommandBuilder ls(LsOptions options, String... paths) { 519 join(Ls.Factory.ls(options, paths)); 520 return this; 521 } 522 523 /* ------------------ sed ------------------ */ 524 @Override 525 public Unix4jCommandBuilder sed(String... args) { 526 join(Sed.Factory.sed(args)); 527 return this; 528 } 529 @Override 530 public Unix4jCommandBuilder sed(String script) { 531 join(Sed.Factory.sed(script)); 532 return this; 533 } 534 @Override 535 public Unix4jCommandBuilder sed(String regexp, String replacement) { 536 join(Sed.Factory.sed(regexp, replacement)); 537 return this; 538 } 539 @Override 540 public Unix4jCommandBuilder sed(String regexp, String replacement, int... occurrence) { 541 join(Sed.Factory.sed(regexp, replacement, occurrence)); 542 return this; 543 } 544 @Override 545 public Unix4jCommandBuilder sed(SedOptions options, String regexp) { 546 join(Sed.Factory.sed(options, regexp)); 547 return this; 548 } 549 @Override 550 public Unix4jCommandBuilder sed(SedOptions options, String string1, String string2) { 551 join(Sed.Factory.sed(options, string1, string2)); 552 return this; 553 } 554 @Override 555 public Unix4jCommandBuilder sed(SedOptions options, String string1, String string2, int... occurrence) { 556 join(Sed.Factory.sed(options, string1, string2, occurrence)); 557 return this; 558 } 559 560 /* ------------------ sort ------------------ */ 561 @Override 562 public Unix4jCommandBuilder sort() { 563 join(Sort.Factory.sort()); 564 return this; 565 } 566 @Override 567 public Unix4jCommandBuilder sort(String... args) { 568 join(Sort.Factory.sort(args)); 569 return this; 570 } 571 @Override 572 public Unix4jCommandBuilder sort(java.io.File... files) { 573 join(Sort.Factory.sort(files)); 574 return this; 575 } 576 @Override 577 public Unix4jCommandBuilder sort(org.unix4j.io.Input... inputs) { 578 join(Sort.Factory.sort(inputs)); 579 return this; 580 } 581 @Override 582 public Unix4jCommandBuilder sort(java.util.Comparator<? super org.unix4j.line.Line> comparator) { 583 join(Sort.Factory.sort(comparator)); 584 return this; 585 } 586 @Override 587 public Unix4jCommandBuilder sort(java.util.Comparator<? super org.unix4j.line.Line> comparator, java.io.File... files) { 588 join(Sort.Factory.sort(comparator, files)); 589 return this; 590 } 591 @Override 592 public Unix4jCommandBuilder sort(java.util.Comparator<? super org.unix4j.line.Line> comparator, String... paths) { 593 join(Sort.Factory.sort(comparator, paths)); 594 return this; 595 } 596 @Override 597 public Unix4jCommandBuilder sort(java.util.Comparator<? super org.unix4j.line.Line> comparator, org.unix4j.io.Input... inputs) { 598 join(Sort.Factory.sort(comparator, inputs)); 599 return this; 600 } 601 @Override 602 public Unix4jCommandBuilder sort(SortOptions options) { 603 join(Sort.Factory.sort(options)); 604 return this; 605 } 606 @Override 607 public Unix4jCommandBuilder sort(SortOptions options, java.io.File... files) { 608 join(Sort.Factory.sort(options, files)); 609 return this; 610 } 611 @Override 612 public Unix4jCommandBuilder sort(SortOptions options, String... paths) { 613 join(Sort.Factory.sort(options, paths)); 614 return this; 615 } 616 @Override 617 public Unix4jCommandBuilder sort(SortOptions options, org.unix4j.io.Input... inputs) { 618 join(Sort.Factory.sort(options, inputs)); 619 return this; 620 } 621 @Override 622 public Unix4jCommandBuilder sort(SortOptions options, java.util.Comparator<? super org.unix4j.line.Line> comparator) { 623 join(Sort.Factory.sort(options, comparator)); 624 return this; 625 } 626 @Override 627 public Unix4jCommandBuilder sort(SortOptions options, java.util.Comparator<? super org.unix4j.line.Line> comparator, java.io.File... files) { 628 join(Sort.Factory.sort(options, comparator, files)); 629 return this; 630 } 631 @Override 632 public Unix4jCommandBuilder sort(SortOptions options, java.util.Comparator<? super org.unix4j.line.Line> comparator, String... paths) { 633 join(Sort.Factory.sort(options, comparator, paths)); 634 return this; 635 } 636 @Override 637 public Unix4jCommandBuilder sort(SortOptions options, java.util.Comparator<? super org.unix4j.line.Line> comparator, org.unix4j.io.Input... inputs) { 638 join(Sort.Factory.sort(options, comparator, inputs)); 639 return this; 640 } 641 642 /* ------------------ tail ------------------ */ 643 @Override 644 public Unix4jCommandBuilder tail() { 645 join(Tail.Factory.tail()); 646 return this; 647 } 648 @Override 649 public Unix4jCommandBuilder tail(String... args) { 650 join(Tail.Factory.tail(args)); 651 return this; 652 } 653 @Override 654 public Unix4jCommandBuilder tail(long count) { 655 join(Tail.Factory.tail(count)); 656 return this; 657 } 658 @Override 659 public Unix4jCommandBuilder tail(TailOptions options, long count) { 660 join(Tail.Factory.tail(options, count)); 661 return this; 662 } 663 @Override 664 public Unix4jCommandBuilder tail(java.io.File... files) { 665 join(Tail.Factory.tail(files)); 666 return this; 667 } 668 @Override 669 public Unix4jCommandBuilder tail(org.unix4j.io.Input... inputs) { 670 join(Tail.Factory.tail(inputs)); 671 return this; 672 } 673 @Override 674 public Unix4jCommandBuilder tail(long count, java.io.File... files) { 675 join(Tail.Factory.tail(count, files)); 676 return this; 677 } 678 @Override 679 public Unix4jCommandBuilder tail(long count, String... paths) { 680 join(Tail.Factory.tail(count, paths)); 681 return this; 682 } 683 @Override 684 public Unix4jCommandBuilder tail(long count, org.unix4j.io.Input... inputs) { 685 join(Tail.Factory.tail(count, inputs)); 686 return this; 687 } 688 @Override 689 public Unix4jCommandBuilder tail(TailOptions options, long count, java.io.File... files) { 690 join(Tail.Factory.tail(options, count, files)); 691 return this; 692 } 693 @Override 694 public Unix4jCommandBuilder tail(TailOptions options, long count, String... paths) { 695 join(Tail.Factory.tail(options, count, paths)); 696 return this; 697 } 698 @Override 699 public Unix4jCommandBuilder tail(TailOptions options, long count, org.unix4j.io.Input... inputs) { 700 join(Tail.Factory.tail(options, count, inputs)); 701 return this; 702 } 703 704 /* ------------------ uniq ------------------ */ 705 @Override 706 public Unix4jCommandBuilder uniq() { 707 join(Uniq.Factory.uniq()); 708 return this; 709 } 710 @Override 711 public Unix4jCommandBuilder uniq(String... args) { 712 join(Uniq.Factory.uniq(args)); 713 return this; 714 } 715 @Override 716 public Unix4jCommandBuilder uniq(java.io.File file) { 717 join(Uniq.Factory.uniq(file)); 718 return this; 719 } 720 @Override 721 public Unix4jCommandBuilder uniq(String path) { 722 join(Uniq.Factory.uniq(path)); 723 return this; 724 } 725 @Override 726 public Unix4jCommandBuilder uniq(UniqOptions options) { 727 join(Uniq.Factory.uniq(options)); 728 return this; 729 } 730 @Override 731 public Unix4jCommandBuilder uniq(UniqOptions options, java.io.File file) { 732 join(Uniq.Factory.uniq(options, file)); 733 return this; 734 } 735 @Override 736 public Unix4jCommandBuilder uniq(UniqOptions options, String path) { 737 join(Uniq.Factory.uniq(options, path)); 738 return this; 739 } 740 741 /* ------------------ wc ------------------ */ 742 @Override 743 public Unix4jCommandBuilder wc() { 744 join(Wc.Factory.wc()); 745 return this; 746 } 747 @Override 748 public Unix4jCommandBuilder wc(String... args) { 749 join(Wc.Factory.wc(args)); 750 return this; 751 } 752 @Override 753 public Unix4jCommandBuilder wc(java.io.File... files) { 754 join(Wc.Factory.wc(files)); 755 return this; 756 } 757 @Override 758 public Unix4jCommandBuilder wc(org.unix4j.io.Input... inputs) { 759 join(Wc.Factory.wc(inputs)); 760 return this; 761 } 762 @Override 763 public Unix4jCommandBuilder wc(WcOptions options) { 764 join(Wc.Factory.wc(options)); 765 return this; 766 } 767 @Override 768 public Unix4jCommandBuilder wc(WcOptions options, java.io.File... files) { 769 join(Wc.Factory.wc(options, files)); 770 return this; 771 } 772 @Override 773 public Unix4jCommandBuilder wc(WcOptions options, String[] paths) { 774 join(Wc.Factory.wc(options, paths)); 775 return this; 776 } 777 @Override 778 public Unix4jCommandBuilder wc(WcOptions options, org.unix4j.io.Input... inputs) { 779 join(Wc.Factory.wc(options, inputs)); 780 return this; 781 } 782 783 /* ------------------ xargs ------------------ */ 784 @Override 785 public Unix4jCommandBuilder xargs() { 786 join(Xargs.Factory.xargs()); 787 return this; 788 } 789 @Override 790 public Unix4jCommandBuilder xargs(String... args) { 791 join(Xargs.Factory.xargs(args)); 792 return this; 793 } 794 @Override 795 public Unix4jCommandBuilder xargs(String delimiter) { 796 join(Xargs.Factory.xargs(delimiter)); 797 return this; 798 } 799 @Override 800 public Unix4jCommandBuilder xargs(long maxLines) { 801 join(Xargs.Factory.xargs(maxLines)); 802 return this; 803 } 804 @Override 805 public Unix4jCommandBuilder xargs(int maxArgs) { 806 join(Xargs.Factory.xargs(maxArgs)); 807 return this; 808 } 809 @Override 810 public Unix4jCommandBuilder xargs(long maxLines, int maxArgs) { 811 join(Xargs.Factory.xargs(maxLines, maxArgs)); 812 return this; 813 } 814 @Override 815 public Unix4jCommandBuilder xargs(String delimiter, long maxLines) { 816 join(Xargs.Factory.xargs(delimiter, maxLines)); 817 return this; 818 } 819 @Override 820 public Unix4jCommandBuilder xargs(String delimiter, int maxArgs) { 821 join(Xargs.Factory.xargs(delimiter, maxArgs)); 822 return this; 823 } 824 @Override 825 public Unix4jCommandBuilder xargs(String delimiter, long maxLines, int maxArgs) { 826 join(Xargs.Factory.xargs(delimiter, maxLines, maxArgs)); 827 return this; 828 } 829 @Override 830 public Unix4jCommandBuilder xargs(String delimiter, String eof, long maxLines, int maxArgs) { 831 join(Xargs.Factory.xargs(delimiter, eof, maxLines, maxArgs)); 832 return this; 833 } 834 @Override 835 public Unix4jCommandBuilder xargs(XargsOptions options) { 836 join(Xargs.Factory.xargs(options)); 837 return this; 838 } 839 @Override 840 public Unix4jCommandBuilder xargs(XargsOptions options, String delimiter) { 841 join(Xargs.Factory.xargs(options, delimiter)); 842 return this; 843 } 844 @Override 845 public Unix4jCommandBuilder xargs(XargsOptions options, long maxLines) { 846 join(Xargs.Factory.xargs(options, maxLines)); 847 return this; 848 } 849 @Override 850 public Unix4jCommandBuilder xargs(XargsOptions options, int maxArgs) { 851 join(Xargs.Factory.xargs(options, maxArgs)); 852 return this; 853 } 854 @Override 855 public Unix4jCommandBuilder xargs(XargsOptions options, long maxLines, int maxArgs) { 856 join(Xargs.Factory.xargs(options, maxLines, maxArgs)); 857 return this; 858 } 859 @Override 860 public Unix4jCommandBuilder xargs(XargsOptions options, String delimiter, long maxLines) { 861 join(Xargs.Factory.xargs(options, delimiter, maxLines)); 862 return this; 863 } 864 @Override 865 public Unix4jCommandBuilder xargs(XargsOptions options, String delimiter, int maxArgs) { 866 join(Xargs.Factory.xargs(options, delimiter, maxArgs)); 867 return this; 868 } 869 @Override 870 public Unix4jCommandBuilder xargs(XargsOptions options, String delimiter, long maxLines, int maxArgs) { 871 join(Xargs.Factory.xargs(options, delimiter, maxLines, maxArgs)); 872 return this; 873 } 874 @Override 875 public Unix4jCommandBuilder xargs(XargsOptions options, String delimiter, String eof, long maxLines, int maxArgs) { 876 join(Xargs.Factory.xargs(options, delimiter, eof, maxLines, maxArgs)); 877 return this; 878 } 879 880 @Override 881 public Unix4jCommandBuilder join(Command<?> command) { 882 super.join(command); 883 return this; 884 } 885 886 @Override 887 public Unix4jCommandBuilder apply(LineOperation operation) { 888 super.apply(operation); 889 return this; 890 } 891 892 @Override 893 public Unix4jCommandBuilder reset() { 894 super.reset(); 895 return this; 896 } 897 898}