@Test(expected = IllegalArgumentException.class) public void fileFactoryNullFile() { FileOrDirectoryTaskOutput.file(null); }
public static FileOrDirectoryTaskOutput file(File file) { if (file == null || (file.exists() && !file.isFile())) { throw new IllegalArgumentException("A valid instance is expected (not null or existing file)."); } return new FileOrDirectoryTaskOutput(file); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput file(File file) { if (file == null || (file.exists() && !file.isFile())) { throw new IllegalArgumentException("A valid instance is expected (not null or existing file)."); } return new FileOrDirectoryTaskOutput(file); } }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput file(File file) { if (file == null || (file.exists() && !file.isFile())) { throw new IllegalArgumentException("A valid instance is expected (not null or existing file)."); } return new FileOrDirectoryTaskOutput(file); } FileOrDirectoryTaskOutput(File file); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput file(File file) { if (file == null || (file.exists() && !file.isFile())) { throw new IllegalArgumentException("A valid instance is expected (not null or existing file)."); } return new FileOrDirectoryTaskOutput(file); } FileOrDirectoryTaskOutput(File file); @Override File getDestination(); @Override void accept(TaskOutputDispatcher writer); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static FileOrDirectoryTaskOutput file(File file); static FileOrDirectoryTaskOutput directory(File directory); }
FileOrDirectoryTaskOutput extends AbstractTaskOutput implements SingleOrMultipleTaskOutput { public static FileOrDirectoryTaskOutput file(File file) { if (file == null || (file.exists() && !file.isFile())) { throw new IllegalArgumentException("A valid instance is expected (not null or existing file)."); } return new FileOrDirectoryTaskOutput(file); } FileOrDirectoryTaskOutput(File file); @Override File getDestination(); @Override void accept(TaskOutputDispatcher writer); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static FileOrDirectoryTaskOutput file(File file); static FileOrDirectoryTaskOutput directory(File directory);  }