|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mapping
A Mapping is a relationship between a source domain to target domain of integers.
This interface represents the most general possible mapping. Depending on
the MappingType
of a particular mapping, some of the operations may
not be applicable. If you call the method, you will receive a runtime error.
For instance:
Mappings.SourceMapping.getSource(int)
will throw Mappings.TooManyElementsException
.
Mappings.FunctionMapping.getTarget(int)
will throw
Mappings.NoElementException
.
Method Summary | |
---|---|
MappingType |
getMappingType()
|
int |
getSourceCount()
Returns the number of sources. |
int |
getTargetCount()
Returns the number of targets. |
boolean |
isIdentity()
Returns whether this mapping is the identity. |
Iterator<IntPair> |
iterator()
Returns an iterator over the elements in this mapping. |
Methods inherited from interface org.eigenbase.util.mapping.Mappings.FunctionMapping |
---|
getTarget, getTargetOpt |
Methods inherited from interface org.eigenbase.util.mapping.Mappings.SourceMapping |
---|
getSource, getSourceOpt, getTargetOpt, inverse |
Methods inherited from interface org.eigenbase.util.mapping.Mappings.TargetMapping |
---|
getSourceOpt, getTarget, getTargetOpt, inverse, set |
Method Detail |
---|
Iterator<IntPair> iterator()
This method is optional; implementations may throw UnsupportedOperationException
.
int getSourceCount()
getSourceCount
in interface Mappings.FunctionMapping
getSourceCount
in interface Mappings.SourceMapping
getSourceCount
in interface Mappings.TargetMapping
int getTargetCount()
getTargetCount
in interface Mappings.SourceMapping
getTargetCount
in interface Mappings.TargetMapping
MappingType getMappingType()
getMappingType
in interface Mappings.FunctionMapping
getMappingType
in interface Mappings.SourceMapping
getMappingType
in interface Mappings.TargetMapping
boolean isIdentity()
isIdentity
in interface Mappings.SourceMapping
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |