public static class Mappings.OverridingTargetMapping extends Mappings.AbstractMapping implements Mappings.TargetMapping
Mappings.TargetMapping
except for specific overriding elements.Modifier and Type | Field and Description |
---|---|
private Mappings.TargetMapping |
parent |
private int |
source |
private int |
target |
Constructor and Description |
---|
OverridingTargetMapping(Mappings.TargetMapping parent,
int target,
int source) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all elements in the mapping.
|
MappingType |
getMappingType()
Returns the mapping type.
|
int |
getTarget(int source)
Returns the target that a source maps to.
|
Mapping |
inverse() |
boolean |
isIdentity()
Returns whether this mapping is the identity.
|
java.util.Iterator<IntPair> |
iterator()
Returns an iterator over the elements in this mapping.
|
void |
set(int source,
int target) |
int |
size()
Returns the number of elements in the mapping.
|
getSource, getSourceCount, getSourceOpt, getTargetCount, getTargetOpt, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSourceCount, getSourceOpt, getTargetCount, getTargetOpt
private final Mappings.TargetMapping parent
private final int target
private final int source
public OverridingTargetMapping(Mappings.TargetMapping parent, int target, int source)
public void clear()
Mapping
public int size()
Mappings.CoreMapping
size
in interface Mapping
size
in interface Mappings.CoreMapping
public void set(int source, int target)
set
in interface Mappings.TargetMapping
set
in class Mappings.AbstractMapping
public Mapping inverse()
inverse
in interface Mappings.SourceMapping
inverse
in interface Mappings.TargetMapping
public MappingType getMappingType()
Mappings.CoreMapping
getMappingType
in interface Mapping
getMappingType
in interface Mappings.CoreMapping
getMappingType
in interface Mappings.FunctionMapping
getMappingType
in interface Mappings.SourceMapping
public boolean isIdentity()
Mapping
isIdentity
in interface Mapping
isIdentity
in interface Mappings.SourceMapping
isIdentity
in class Mappings.AbstractMapping
public int getTarget(int source)
Mappings.FunctionMapping
getTarget
in interface Mappings.FunctionMapping
getTarget
in interface Mappings.TargetMapping
getTarget
in class Mappings.AbstractMapping
source
- sourceCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.