public class DateTimeDomain extends TimeDomain
AbstractStringDomain.PatternResolver
Constructor and Description |
---|
DateTimeDomain()
Creates a new DateTimeDomain instance.
|
DateTimeDomain(Date minDate,
Date maxDate)
Creates a new DateTimeDomain instance.
|
Modifier and Type | Method and Description |
---|---|
protected String |
assertValidTime(String value)
Reports a failure if the given value is not a valid time string.
|
protected DataValue<String> |
dataValueOf(String value)
Returns a
DataValue for the given value in this domain. |
protected String |
format(Date time)
Returns the string representation of the given time.
|
String |
getFormat()
Returns the format for values that belong to this domain.
|
protected void |
initLengthRange()
Defines the initial length range for values in this domain.
|
protected boolean |
isValidTime(String value)
Returns true if the given value is a valid time string.
|
void |
setFormat(String format)
Changes the format for values that belong to this domain.
|
protected Stream<Date> |
timeValues(ResolverContext context)
Returns a random sequence of time values from this domain.
|
protected boolean |
valuesEqual(String value1,
String value2)
Returns true if the given values are equal.
|
contains, getMaxDate, getMinDate, newValue, newValues, setDateRange, setExcluded, toString
candidates, generateMatchingValues, getCharacters, getLength, getMatching, getNotMatching, matchesPatterns, matchingCandidates, matchingValues, setExcludedStrings, setMatching, setMatching, setNotMatching, setNotMatching
getExcluded, getLengthRange, getMaxLength, getTypes, isNotExcluded, setLengthRange, setLengthRange, setLengthRange, setLengthRange, values
withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
public void setFormat(String format)
setFormat
in class AbstractValueDomain<String>
public String getFormat()
getFormat
in interface ValueDomain<String>
getFormat
in class AbstractValueDomain<String>
protected DataValue<String> dataValueOf(String value)
DataValue
for the given value in this domain.dataValueOf
in class AbstractStringDomain
protected void initLengthRange()
initLengthRange
in class SequenceDomain<String>
protected boolean valuesEqual(String value1, String value2)
valuesEqual
in class SequenceDomain<String>
protected Stream<Date> timeValues(ResolverContext context)
timeValues
in class TimeDomain
protected String assertValidTime(String value)
assertValidTime
in class TimeDomain
protected boolean isValidTime(String value)
isValidTime
in class TimeDomain
protected String format(Date time)
format
in class TimeDomain
Copyright © 2024 The Cornutum Project. All rights reserved.