public abstract class TimeDomain extends RestrictedStringDomain
| Modifier | Constructor and Description |
|---|---|
protected |
TimeDomain(int maxLength,
Date minDate,
Date maxDate)
Creates a new TimeDomain instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
assertValidTime(String value)
Reports a failure if the given value is not a valid time string.
|
protected Stream<String> |
candidates(ResolverContext context)
Returns a random sequence of possible members of this domain.
|
boolean |
contains(String value)
Returns true if the given value belongs to this domain.
|
protected abstract String |
format(Date time)
Returns the string representation of the given time.
|
Date |
getMaxDate()
Returns the maximum date for this domain.
|
Date |
getMinDate()
Returns the minimum date for this domain.
|
protected abstract boolean |
isValidTime(String value)
Returns true if the given value is a valid time string.
|
protected String |
newValue(ResolverContext context,
int length)
Returns a new random string of the given length for this domain.
|
protected void |
setDateRange(Date minDate,
Date maxDate)
Changes the (inclusive) date range for this domain.
|
void |
setExcluded(Set<String> excluded)
Changes the values excluded from this domain.
|
protected abstract Stream<Date> |
timeValues(ResolverContext context)
Returns a random sequence of time values from this domain.
|
String |
toString() |
isRestrictedLength, setLengthRange, setLengthRange, setLengthRangedataValueOf, getLength, newValue, setExcludedStringsgetExcluded, getLengthRange, getMaxLength, getTypes, initLengthRange, isNotExcluded, setLengthRange, values, valuesEqualclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrayOf, arrayOf, arrayOf, contains, containsObject, select, selectValue, valueOfprotected void setDateRange(Date minDate, Date maxDate)
public Date getMinDate()
public Date getMaxDate()
public void setExcluded(Set<String> excluded)
setExcluded in class SequenceDomain<String>protected Stream<String> candidates(ResolverContext context)
candidates in class AbstractStringDomainpublic boolean contains(String value)
contains in interface ValueDomain<String>contains in class SequenceDomain<String>protected String newValue(ResolverContext context, int length)
newValue in class AbstractStringDomainprotected abstract Stream<Date> timeValues(ResolverContext context)
protected abstract String assertValidTime(String value)
protected abstract boolean isValidTime(String value)
protected abstract String format(Date time)
public String toString()
toString in class SequenceDomain<String>Copyright © 2020 The Cornutum Project. All rights reserved.