public class TypeMapping extends Object implements FreeTypeMapping
Constructor and Description |
---|
TypeMapping() |
Modifier and Type | Method and Description |
---|---|
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).
|
Set<FreeType> |
getMappedFreeTypes()
Returns the set of mapped free types.
|
void |
initBounds(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 . |
String |
toString() |
public void initBounds(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 Set<FreeType> getMappedFreeTypes()
public 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
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.