public class Base64Domain extends SequenceDomain<String>
Constructor and Description |
---|
Base64Domain()
Creates a new Base64Domain instance.
|
Base64Domain(int maxLength)
Creates a new Base64Domain instance.
|
Modifier and Type | Method and Description |
---|---|
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 DataValue<String> |
dataValueOf(String value)
Returns a
DataValue for the given value in this domain. |
static byte[] |
decoded(String base64)
Returns the bytes represented by the given base64 encoding.
|
static String |
encoded(byte[] bytes)
Returns the base64 encoding of the given bytes.
|
Set<String> |
getExcluded()
Returns the values excluded from this domain.
|
String |
getFormat()
Returns the format for values that belong to this domain.
|
protected int |
getLength(String value)
Returns the length of the given value.
|
protected LengthDomain |
getLengthRange()
Returns the length range for values in this domain.
|
void |
setExcluded(Set<String> excluded)
Changes the values excluded from this domain.
|
void |
setExcludedStrings(Set<String> excluded)
Changes the values excluded from this domain.
|
void |
setFormat(String format)
Changes the format for values that belong to this domain.
|
void |
setLengthRange(Integer length)
Defines a constant length range for values in this domain.
|
void |
setLengthRange(Integer min,
Integer max)
Defines the length range for values in this domain.
|
void |
setLengthRange(NumberDomain.Range range)
Defines the length range for values in this domain.
|
getMaxLength, getTypes, initLengthRange, isNotExcluded, setLengthRange, toString, values, valuesEqual
withFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
arrayOf, arrayOf, arrayOf, contains, containsObject, getType, select, selectValue
public Base64Domain()
public Base64Domain(int maxLength)
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 AbstractValueDomain<String>
public void setExcludedStrings(Set<String> excluded)
setExcludedStrings
in class SequenceDomain<String>
protected int getLength(String value)
getLength
in class SequenceDomain<String>
public void setLengthRange(Integer length)
setLengthRange
in class SequenceDomain<String>
public void setLengthRange(Integer min, Integer max)
setLengthRange
in class SequenceDomain<String>
public void setLengthRange(NumberDomain.Range range)
setLengthRange
in class SequenceDomain<String>
protected LengthDomain getLengthRange()
getLengthRange
in class SequenceDomain<String>
public void setExcluded(Set<String> excluded)
setExcluded
in class SequenceDomain<String>
public Set<String> getExcluded()
getExcluded
in class SequenceDomain<String>
public static String encoded(byte[] bytes)
public static byte[] decoded(String base64)
public boolean contains(String value)
contains
in interface ValueDomain<String>
contains
in class SequenceDomain<String>
protected Stream<String> candidates(ResolverContext context)
candidates
in class SequenceDomain<String>
Copyright © 2024 The Cornutum Project. All rights reserved.