public static class Mappings.OverridingTargetMapping extends Mappings.AbstractMapping implements Mappings.TargetMapping
Mappings.TargetMapping except for specific overriding elements.| Constructor and Description |
|---|
Mappings.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.
|
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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSourceCount, getSourceOpt, getTargetCount, getTargetOptpublic Mappings.OverridingTargetMapping(Mappings.TargetMapping parent, int target, int source)
public void clear()
Mappingpublic int size()
Mappings.CoreMappingsize in interface Mappingsize in interface Mappings.CoreMappingpublic void set(int source,
int target)
set in interface Mappings.TargetMappingset in class Mappings.AbstractMappingpublic Mapping inverse()
inverse in interface Mappings.SourceMappinginverse in interface Mappings.TargetMappingpublic MappingType getMappingType()
Mappings.CoreMappinggetMappingType in interface MappinggetMappingType in interface Mappings.CoreMappinggetMappingType in interface Mappings.FunctionMappinggetMappingType in interface Mappings.SourceMappingpublic boolean isIdentity()
MappingisIdentity in interface MappingisIdentity in interface Mappings.SourceMappingisIdentity in class Mappings.AbstractMappingpublic int getTarget(int source)
Mappings.FunctionMappinggetTarget in interface Mappings.FunctionMappinggetTarget in interface Mappings.TargetMappinggetTarget in class Mappings.AbstractMappingsource - sourcepublic Iterator<IntPair> iterator()
MappingThis method is optional; implementations may throw
UnsupportedOperationException.
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.