|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.util.mapping.Mappings.AbstractMapping
org.eigenbase.util.mapping.Mappings.IdentityMapping
public static class Mappings.IdentityMapping
| Field Summary | |
|---|---|
private int |
size
|
| Constructor Summary | |
|---|---|
Mappings.IdentityMapping(int size)
Creates an identity mapping. |
|
| Method Summary | |
|---|---|
MappingType |
getMappingType()
|
int |
getSource(int target)
|
int |
getSourceCount()
Returns the number of sources. |
int |
getSourceOpt(int target)
|
int |
getTarget(int source)
Returns the target that a source maps to. |
int |
getTargetCount()
Returns the number of targets. |
int |
getTargetOpt(int source)
Returns the target that a source maps to, or -1 if it is not mapped. |
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final int size
| Constructor Detail |
|---|
public Mappings.IdentityMapping(int size)
size - Size, or -1 if infinite.| Method Detail |
|---|
public Mapping inverse()
inverse in interface Mappings.SourceMappinginverse in interface Mappings.TargetMappingpublic boolean isIdentity()
Mapping
isIdentity in interface MappingisIdentity in interface Mappings.SourceMappingisIdentity in class Mappings.AbstractMapping
public void set(int source,
int target)
set in interface Mappings.TargetMappingset in class Mappings.AbstractMappingpublic MappingType getMappingType()
getMappingType in interface MappinggetMappingType in interface Mappings.FunctionMappinggetMappingType in interface Mappings.SourceMappinggetMappingType in interface Mappings.TargetMappingpublic int getSourceCount()
Mapping
getSourceCount in interface MappinggetSourceCount in interface Mappings.FunctionMappinggetSourceCount in interface Mappings.SourceMappinggetSourceCount in interface Mappings.TargetMappinggetSourceCount in class Mappings.AbstractMappingpublic int getTargetCount()
Mapping
getTargetCount in interface MappinggetTargetCount in interface Mappings.SourceMappinggetTargetCount in interface Mappings.TargetMappinggetTargetCount in class Mappings.AbstractMappingpublic int getTarget(int source)
Mappings.FunctionMapping
getTarget in interface Mappings.FunctionMappinggetTarget in interface Mappings.TargetMappinggetTarget in class Mappings.AbstractMappingsource - source
public int getTargetOpt(int source)
Mappings.FunctionMapping
getTargetOpt in interface Mappings.FunctionMappinggetTargetOpt in interface Mappings.SourceMappinggetTargetOpt in interface Mappings.TargetMappinggetTargetOpt in class Mappings.AbstractMappingpublic int getSource(int target)
getSource in interface Mappings.SourceMappinggetSource in class Mappings.AbstractMappingpublic int getSourceOpt(int target)
getSourceOpt in interface Mappings.SourceMappinggetSourceOpt in interface Mappings.TargetMappinggetSourceOpt in class Mappings.AbstractMappingpublic Iterator<IntPair> iterator()
MappingThis method is optional; implementations may throw UnsupportedOperationException.
iterator in interface Iterable<IntPair>iterator in interface Mapping
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||