filter in list by time java

Java
    public boolean contains ( LocalDate localDate ) {
        // Regarding the beginning date, a short way of saying2 "is equal to or is later than" is "is not before".
        boolean x = ( ! localDate.isBefore( this.start ) ) && localDate.isBefore( this.stop );
        return x;
    }
Source

Also in Java: