public class BMapType extends BType implements BIndexedType
BMapType represents a type of a map in Ballerina.
Maps are defined using the map keyword as follows: map mapName
All maps are unbounded in length and support key based indexing.
pkgPath, typeName, valueClass| Constructor and Description |
|---|
BMapType(BType constraint) |
BMapType(String typeName,
BType constraint,
String pkgPath)
Create a type from the given name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
BType |
getConstrainedType()
Returns element types which this map is constrained to.
|
BType |
getElementType()
Deprecated.
use
getConstrainedType() instead. |
<V extends BValue> |
getEmptyValue()
Get the empty initialized value of this type.
|
TypeSignature |
getSig() |
int |
getTag() |
<V extends BValue> |
getZeroValue()
Get the default value of the type.
|
String |
toString() |
getName, getPackagePath, getValueClass, hashCode, isNative, isPublicpublic BMapType(String typeName, BType constraint, String pkgPath)
typeName - string name of the type.constraint - constraint type which particular map is bound to.pkgPath - package for the type.public BMapType(BType constraint)
public BType getConstrainedType()
@Deprecated public BType getElementType()
getConstrainedType() instead.getElementType in interface BIndexedTypepublic <V extends BValue> V getZeroValue()
BTypeBType#getInitValue().getZeroValue in class BTypeV - Type of the valuepublic <V extends BValue> V getEmptyValue()
BTypeBType#getDefaultValue()).getEmptyValue in class BTypeV - Type of the valuepublic TypeSignature getSig()
Copyright © 2018 WSO2. All rights reserved.