# Class AreaMapper

java.lang.Object
uk.ac.starlink.ttools.AreaMapper

All Implemented Interfaces:
  `uk.ac.starlink.table.DomainMapper`

public abstract class AreaMapper extends Object implements uk.ac.starlink.table.DomainMapper
DomainMapper for AreaDomain.

Since:
  14 Apr 2020
Author:
  Mark Taylor

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AreaMapper(String sourceName, String sourceDescription, Class<?> sourceClazz)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`abstract Function<Object,Area>`
`areaFunction(Class<?> aclazz)`
Returns a function that can map source objects of a given class to corresponding Area instances.
`String`
`getSkySourceDescription()`
Returns a version of the source description text that is suitable for use in the context of sky coordinates.
`Class<?>`
`getSourceClass()`
`String`
`getSourceDescription()`
`String`
`getSourceName()`
`AreaDomain`
`getTargetDomain()`
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AreaMapper

protected AreaMapper(String sourceName, String sourceDescription, Class<?> sourceClazz)
Constructor.

Parameters:
  `sourceName` - source name
  `sourceDescription` - source description, may include XML formatting but don't wrap in <p> tags
  `sourceClazz` - source class

## Method Details

### getTargetDomain

public AreaDomain getTargetDomain()

Specified by:
  `getTargetDomain` in interface `uk.ac.starlink.table.DomainMapper`
Returns:
  `AreaDomain.INSTANCE`

### getSourceClass

public Class<?> getSourceClass()

Specified by:
  `getSourceClass` in interface `uk.ac.starlink.table.DomainMapper`

### getSourceName

public String getSourceName()

Specified by:
  `getSourceName` in interface `uk.ac.starlink.table.DomainMapper`

### getSourceDescription

public String getSourceDescription()

Specified by:
  `getSourceDescription` in interface `uk.ac.starlink.table.DomainMapper`

### getSkySourceDescription

public String getSkySourceDescription()
Returns a version of the source description text that is suitable for use in the context of sky coordinates.

The default implementation simply calls `getSourceDescription()`.

Returns:
  sky description

### areaFunction

public abstract Function<Object,Area> areaFunction(Class<?> aclazz)
Returns a function that can map source objects of a given class to corresponding Area instances.

Parameters:
  `aclazz` - class of objects that is to be mapped
Returns:
  function that converts typed objects to Area instances

### toString

public String toString()

Overrides:
  `toString` in class `Object`