public abstract class AbstractSourceMapping extends Mappings.AbstractMapping implements Mapping
Mappings.TargetMapping where the
number of sources and targets are specified as constructor parameters and you
just need to implement one method,| Constructor and Description |
|---|
AbstractSourceMapping(int sourceCount,
int targetCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all elements in the mapping.
|
MappingType |
getMappingType()
Returns the mapping type.
|
int |
getSourceCount()
Returns the number of sources.
|
abstract int |
getSourceOpt(int source) |
int |
getTargetCount()
Returns the number of targets.
|
Mapping |
inverse() |
Iterator<IntPair> |
iterator()
Returns an iterator over the elements in this mapping.
|
int |
size()
Returns the number of elements in the mapping.
|
getSource, getTarget, getTargetOpt, isIdentity, set, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisIdentitygetSource, getTargetOptgetTarget, getTargetOpt, setpublic AbstractSourceMapping(int sourceCount,
int targetCount)
public int getSourceCount()
MappinggetSourceCount in interface MappinggetSourceCount in interface Mappings.FunctionMappinggetSourceCount in interface Mappings.SourceMappinggetSourceCount in interface Mappings.TargetMappinggetSourceCount in class Mappings.AbstractMappingpublic int getTargetCount()
MappinggetTargetCount in interface MappinggetTargetCount in interface Mappings.SourceMappinggetTargetCount in interface Mappings.TargetMappinggetTargetCount in class Mappings.AbstractMappingpublic Mapping inverse()
inverse in interface Mappings.SourceMappinginverse in interface Mappings.TargetMappingpublic int size()
Mappingsize in interface Mappingsize in interface Mappings.CoreMappingpublic void clear()
Mappingpublic MappingType getMappingType()
Mappings.CoreMappinggetMappingType in interface MappinggetMappingType in interface Mappings.CoreMappinggetMappingType in interface Mappings.FunctionMappinggetMappingType in interface Mappings.SourceMappingpublic Iterator<IntPair> iterator()
MappingThis method is optional; implementations may throw
UnsupportedOperationException.
public abstract int getSourceOpt(int source)
getSourceOpt in interface Mappings.SourceMappinggetSourceOpt in interface Mappings.TargetMappinggetSourceOpt in class Mappings.AbstractMappingCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.