public class ValidityPeriod extends EqualsSupport implements Serializable
| Constructor and Description |
|---|
ValidityPeriod() |
ValidityPeriod(Date notValidBefore,
Date notValidAfter) |
ValidityPeriod(org.joda.time.ReadableInstant notValidBefore,
org.joda.time.ReadableInstant notValidAfter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(ValidityPeriod other) |
org.joda.time.DateTime |
getNotValidAfter() |
org.joda.time.DateTime |
getNotValidBefore() |
ValidityPeriod |
intersectedWith(ValidityPeriod other)
Calculates the intersection of two validity periods, taking into account
open-ended validity periods.
|
boolean |
isClosed() |
boolean |
isExpiredAt(org.joda.time.ReadableInstant instant) |
boolean |
isExpiredNow() |
boolean |
isValidAt(org.joda.time.ReadableInstant instant) |
boolean |
isValidNow() |
String |
toString() |
ValidityPeriod |
withNotValidAfter(org.joda.time.ReadableInstant notValidAfter) |
ValidityPeriod |
withNotValidBefore(org.joda.time.ReadableInstant notValidBefore) |
equals, hashCodepublic ValidityPeriod()
public ValidityPeriod(org.joda.time.ReadableInstant notValidBefore,
org.joda.time.ReadableInstant notValidAfter)
public org.joda.time.DateTime getNotValidAfter()
public org.joda.time.DateTime getNotValidBefore()
public ValidityPeriod withNotValidBefore(org.joda.time.ReadableInstant notValidBefore)
public ValidityPeriod withNotValidAfter(org.joda.time.ReadableInstant notValidAfter)
public boolean contains(ValidityPeriod other)
public boolean isExpiredNow()
public boolean isExpiredAt(org.joda.time.ReadableInstant instant)
public boolean isValidNow()
public boolean isValidAt(org.joda.time.ReadableInstant instant)
public boolean isClosed()
public ValidityPeriod intersectedWith(ValidityPeriod other)
other - the validity period to intersect with.public String toString()
toString in class EqualsSupportCopyright © 2008–2019 RIPE Network Coordination Centre (RIPE NCC). All rights reserved.