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.
|
protected int |
getLength(String value)
Returns the length of the given value.
|
protected ValueDomain<Integer> |
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 |
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, isRestrictedLength, setLengthRange, toString, values, valuesEqualclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrayOf, arrayOf, arrayOf, contains, containsObject, select, selectValue, valueOfpublic Base64Domain()
public Base64Domain(int maxLength)
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 ValueDomain<Integer> 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 © 2020 The Cornutum Project. All rights reserved.