static class Mappings.SurjectionWithInverse extends Mappings.PartialMapping
If you call set(int, int) on a target, the target's previous source
will be lost.
sources, targets| Constructor and Description |
|---|
SurjectionWithInverse(int sourceCount,
int targetCount) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSource(int target) |
void |
set(int source,
int target)
Creates a mapping between a source and a target.
|
clear, getMappingType, getSourceCount, getSourceOpt, getTargetCount, getTargetOpt, inverse, isIdentity, isValid, iterator, sizeequals, hashCodegetTarget, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTargetforEach, spliteratorpublic void set(int source,
int target)
It is an error to map a target to a source which already has a target.
If you map a source to a target which already has a source, the old source becomes an orphan.
set in interface Mappings.TargetMappingset in class Mappings.PartialMappingsource - sourcetarget - targetpublic int getSource(int target)
getSource in interface Mappings.SourceMappinggetSource in class Mappings.AbstractMappingCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.