Package com.ssgllc.fish.f.instant
Class F_Instant_Is
java.lang.Object
com.ssgllc.fish.f.instant.F_Instant_Is
Moment comparisons, reached as
is on an F_Instant.
Both after and before take the other moment in any of the
forms InstantBuilder accepts. not() inverts the result, so
is.not().before(x) reads as "is at or after x".
There is deliberately no equal. Two instants are equal only to the nanosecond, which
is almost never what someone comparing them means, and a comparison that fails on a difference
nobody can see looks like bad data rather than a bad question. Say which precision you mean
instead, by asking for the elapsed amount in that unit and testing it against zero:
f().instant.of(a).elapsed.minutes.after(b) == 0 // the same minute f().instant.of(a).elapsed.days.after(b) == 0 // the same day
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this moment is strictly later than a date and time of day, resolved in the system default zone.booleanWhether this moment is strictly later than a date, time of day and explicit zone.booleanWhether this moment is strictly later than an ISO-8601 instant string.booleanWhether this moment is strictly later than anInstant.booleanWhether this moment is strictly later than a map ofdate,timeand optionallytimezone.booleanWhether this moment is strictly earlier than a date and time of day, resolved in the system default zone.booleanWhether this moment is strictly earlier than a date, time of day and explicit zone.booleanWhether this moment is strictly earlier than an ISO-8601 instant string.booleanWhether this moment is strictly earlier than anInstant.booleanWhether this moment is strictly earlier than a map ofdate,timeand optionallytimezone.not()Inverts the comparison that follows, sois.not().after(x)reads as "is not after x".
-
Constructor Details
-
F_Instant_Is
-
F_Instant_Is
-
-
Method Details
-
not
Inverts the comparison that follows, sois.not().after(x)reads as "is not after x".- Returns:
- a comparison view with the result negated
-
after
Whether this moment is strictly later than an ISO-8601 instant string.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.after("2026-01-15T00:00:00Z")
SpEL example:
#f().instant.now().is.after("2026-01-15T00:00:00Z")
-
after
Whether this moment is strictly later than anInstant.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.after(entity.createdDate)
SpEL example:
#f().instant.now().is.after(entity.createdDate)
-
after
Whether this moment is strictly later than a map ofdate,timeand optionallytimezone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.after(['date': '2026-01-15', 'time': '9:00am'])
SpEL example:
#f().instant.now().is.after({'date': '2026-01-15', 'time': '9:00am'})
-
after
Whether this moment is strictly later than a date, time of day and explicit zone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.after("2026-01-15", "9:00am", "America/New_York")
SpEL example:
#f().instant.now().is.after("2026-01-15", "9:00am", "America/New_York")
-
after
Whether this moment is strictly later than a date and time of day, resolved in the system default zone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.after("2026-01-15", "9:00am")
SpEL example:
#f().instant.now().is.after("2026-01-15", "9:00am")
-
before
Whether this moment is strictly earlier than an ISO-8601 instant string.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.before("2026-01-15T00:00:00Z")
SpEL example:
#f().instant.now().is.before("2026-01-15T00:00:00Z")
-
before
Whether this moment is strictly earlier than anInstant.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.before(entity.createdDate)
SpEL example:
#f().instant.now().is.before(entity.createdDate)
-
before
Whether this moment is strictly earlier than a map ofdate,timeand optionallytimezone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.before(['date': '2026-01-15', 'time': '9:00am'])
SpEL example:
#f().instant.now().is.before({'date': '2026-01-15', 'time': '9:00am'})
-
before
Whether this moment is strictly earlier than a date, time of day and explicit zone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.before("2026-01-15", "9:00am", "America/New_York")
SpEL example:
#f().instant.now().is.before("2026-01-15", "9:00am", "America/New_York")
-
before
Whether this moment is strictly earlier than a date and time of day, resolved in the system default zone.- Returns:
- true if it is, or the opposite after
not()
Groovy example:
f().instant.now().is.before("2026-01-15", "9:00am")
SpEL example:
#f().instant.now().is.before("2026-01-15", "9:00am")
-