public static class Mappings.OverridingSourceMapping extends Mappings.AbstractMapping implements Mappings.SourceMapping
Mappings.SourceMapping
except for specific overriding elements.Modifier and Type | Field and Description |
---|---|
private Mappings.SourceMapping |
parent |
private int |
source |
private int |
target |
Constructor and Description |
---|
OverridingSourceMapping(Mappings.SourceMapping parent,
int source,
int target) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all elements in the mapping.
|
MappingType |
getMappingType()
Returns the mapping type.
|
int |
getSource(int target) |
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.
|
int |
size()
Returns the number of elements in the mapping.
|
getSourceCount, getSourceOpt, getTarget, getTargetCount, getTargetOpt, set, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSourceCount, getSourceOpt, getTargetCount, getTargetOpt
private final Mappings.SourceMapping parent
private final int source
private final int target
public OverridingSourceMapping(Mappings.SourceMapping parent, int source, int target)
public void clear()
Mapping
public int size()
Mappings.CoreMapping
size
in interface Mapping
size
in interface Mappings.CoreMapping
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 int getSource(int target)
getSource
in interface Mappings.SourceMapping
getSource
in class Mappings.AbstractMapping
public boolean isIdentity()
Mapping
isIdentity
in interface Mapping
isIdentity
in interface Mappings.SourceMapping
isIdentity
in class Mappings.AbstractMapping
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.