@Override public <U> OptionType<U> map( final FunctionType<T, U> f) { NullCheck.notNull(f, "Function"); return Option.of(f.call(this.x)); }
@Override public <U, E extends Throwable> OptionType<U> mapPartial( final PartialFunctionType<T, U, E> f) throws E { NullCheck.notNull(f, "Function"); return Option.of(f.call(this.x)); }
private Filesystem( final LogUsableType in_log, final @Nullable PathReal in_archives) { this.log = NullCheck.notNull(in_log, "Log").with("filesystem"); this.log_directory = this.log.with("directory"); this.log_mount = this.log.with("mount"); this.log_lookup = this.log.with("lookup"); this.archives = Option.of(in_archives); this.handlers = new ArrayList<ArchiveHandler<?>>(); this.handlers.add(new ArchiveDirectoryHandler()); this.handlers.add(new ArchiveZipHandler()); this.archive_list = new LinkedList<Archive<?>>(); this.directories = new HashMap<PathVirtual, Calendar>(); this.directories.put(PathVirtual.ROOT, Filesystem.getUTCTimeNow()); this.time_updates = new HashMap<PathVirtual, UpdateTimeEntry>(); }