SoyType.Kind| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
SoyType.Kind |
getKind()
Returns what kind of type this is.
|
Set<SoyType> |
getMembers()
Return the set of types contained in this union.
|
int |
hashCode() |
boolean |
isAssignableFrom(SoyType srcType)
Returns true if a parameter or field of this type can be assigned from a value of
srcType. |
boolean |
isNullable()
Returns true if the union includes the null type.
|
static SoyType |
of(Collection<SoyType> members)
Create a union from a collection of types.
|
static SoyType |
of(SoyType... members)
Convenience method for creating unions.
|
SoyType |
removeNullability()
Returns a Soy type that is equivalent to this one but with 'null' removed.
|
String |
toString() |
public static SoyType of(SoyType... members)
members - Member types of the union.public static SoyType of(Collection<SoyType> members)
members - Member types of the union.public SoyType.Kind getKind()
SoyTypepublic boolean isAssignableFrom(SoyType srcType)
SoyTypesrcType.isAssignableFrom in interface SoyTypesrcType - The type of the incoming value.public boolean isNullable()
public SoyType removeNullability()