public class SimpleDomain<T> extends Object implements Domain<SimpleDomain.Mapper<T>>
Modifier and Type | Class and Description |
---|---|
static class |
SimpleDomain.Mapper<T>
Simple mapper implementation.
|
Modifier and Type | Field and Description |
---|---|
static SimpleDomain<Number> |
NUMERIC_DOMAIN
SimpleDomain instance for numeric values.
|
static SimpleDomain.Mapper<Number> |
NUMERIC_MAPPER
Sole DomainMapper for
NUMERIC_DOMAIN . |
Modifier | Constructor and Description |
---|---|
protected |
SimpleDomain(Class<T> clazz,
String domainName,
String sourceName,
String sourceDescription)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDomainName()
Returns the name of this domain.
|
SimpleDomain.Mapper<T> |
getMapper()
Returns sole default mapper instance for this domain.
|
SimpleDomain.Mapper<T>[] |
getMappers()
Returns a list of all mappers known to map values to this domain.
|
SimpleDomain.Mapper<T> |
getPossibleMapper(ValueInfo info)
Returns a typed DomainMapper that can be used
for data described by the given metadata object.
|
SimpleDomain.Mapper<T> |
getProbableMapper(ValueInfo info)
Returns a typed DomainMapper that is likely to be appropriate
for data described by the given metadata object.
|
public static final SimpleDomain<Number> NUMERIC_DOMAIN
public static final SimpleDomain.Mapper<Number> NUMERIC_MAPPER
NUMERIC_DOMAIN
.public String getDomainName()
Domain
getDomainName
in interface Domain<SimpleDomain.Mapper<T>>
public SimpleDomain.Mapper<T>[] getMappers()
Domain
getMappers
in interface Domain<SimpleDomain.Mapper<T>>
public SimpleDomain.Mapper<T> getProbableMapper(ValueInfo info)
Domain
In general, implementations of this method will first check the
ValueInfo.getDomainMappers()
method.
If it is doubtful how to map from the given info to this domain,
null should be returned.
getProbableMapper
in interface Domain<SimpleDomain.Mapper<T>>
info
- metadata describing data to be mappedpublic SimpleDomain.Mapper<T> getPossibleMapper(ValueInfo info)
Domain
If the result of Domain.getProbableMapper(uk.ac.starlink.table.ValueInfo)
is non-null,
then this method must also return non-null, but this method
is not required to return the same value as
getProbableMapper
.
getPossibleMapper
in interface Domain<SimpleDomain.Mapper<T>>
info
- metadata describing data to be mappedpublic SimpleDomain.Mapper<T> getMapper()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.