public class TimePredicate extends Object implements FilePredicate
Modifier and Type | Class and Description |
---|---|
static class |
TimePredicate.DateFromFileNameOlderThanFactory
Factory for file name time predicate.
|
static class |
TimePredicate.Factory
Factory for creating instances.
|
static class |
TimePredicate.UnmodifiedForFactory
Factory for modification time predicate.
|
ALL_FACTORIES
Constructor and Description |
---|
TimePredicate(String filterName,
String value,
java.util.function.Function<FileInfo,Long> getter)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.function.Predicate<FileInfo> |
get()
Get the predicate function from the file predicate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public TimePredicate(String filterName, String value, java.util.function.Function<FileInfo,Long> getter)
filterName
- the filter namevalue
- the string representation of the time span. The string should contain either
one timestamp like "31h" to define an interval after a start time, or
two timestamps delimited by comma like "15m, 1d" to define an interval
between a start time and an end timegetter
- a getter function that returns the timestamp to compare againstpublic java.util.function.Predicate<FileInfo> get()
FilePredicate
get
in interface FilePredicate
Copyright © 2023. All Rights Reserved.