public class TypeMapping extends java.lang.Object implements FreeTypeMapping
Constructor and Description |
---|
TypeMapping() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<FreeType,Type> |
asMap()
Returns the mapping as a map where keys are free types
and values are the actual mapped types.
|
Type |
getFreeTypeMapping(FreeType freeType)
Returns actual type corresponding to given free type (or "null" if no
mapping is specified).
|
java.util.Set<FreeType> |
getMappedFreeTypes()
Returns the set of mapped free types.
|
void |
initBounds(java.util.Map<FreeType,Type> initialBounds)
Initializes type bounds.
|
boolean |
isEmpty() |
void |
reset()
Resets the free type mapping.
|
boolean |
subType(FreeType freeType,
Type other)
Marks that
FreeType should be subtype of other . |
boolean |
superType(FreeType freeType,
Type other)
Marks that
FreeType should be supertype of other . |
java.lang.String |
toString() |
public void initBounds(java.util.Map<FreeType,Type> initialBounds)
initialBounds
- public void reset()
public boolean isEmpty()
true
if there are no free typespublic Type getFreeTypeMapping(FreeType freeType)
getFreeTypeMapping
in interface FreeTypeMapping
freeType
- declared free typepublic java.util.Set<FreeType> getMappedFreeTypes()
public java.util.Map<FreeType,Type> asMap()
public boolean superType(FreeType freeType, Type other)
FreeType
should be supertype of other
.freeType
- other
- public boolean subType(FreeType freeType, Type other)
FreeType
should be subtype of other
.freeType
- other
- public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.