public interface VarAdmin extends PatternAdmin, Var
| Modifier and Type | Method and Description |
|---|---|
default VarAdmin |
asVar() |
Optional<ConceptId> |
getId() |
Collection<VarAdmin> |
getImplicitInnerVars()
Get all inner variables, including implicit variables such as in a has property
|
Collection<VarAdmin> |
getInnerVars() |
String |
getPrintableName() |
java.util.stream.Stream<VarProperty> |
getProperties()
Get a stream of all properties on this variable
|
<T extends VarProperty> |
getProperties(Class<T> type)
Get a stream of all properties of a particular type on this variable
|
<T extends UniqueVarProperty> |
getProperty(Class<T> type)
Get a unique property of a particular type on this variable, if it exists
|
Optional<TypeLabel> |
getTypeLabel() |
Set<TypeLabel> |
getTypeLabels() |
VarName |
getVarName() |
<T extends VarProperty> |
hasProperty(Class<T> type)
Get whether this
Var has a VarProperty of the given type |
boolean |
isUserDefinedName() |
default boolean |
isVar() |
<T extends VarProperty> |
mapProperty(Class<T> type,
java.util.function.UnaryOperator<T> mapper)
Return this
Var with instances of the given VarProperty modified. |
VarAdmin |
setVarName(VarName name) |
asConjunction, asDisjunction, commonVarNames, getDisjunctiveNormalForm, getVars, isConjunction, isDisjunctiondefault boolean isVar()
isVar in interface PatternAdmindefault VarAdmin asVar()
asVar in interface PatternAdminVarName getVarName()
@CheckReturnValue VarAdmin setVarName(VarName name)
name - the new variable name of this variableboolean isUserDefinedName()
java.util.stream.Stream<VarProperty> getProperties()
<T extends VarProperty> java.util.stream.Stream<T> getProperties(Class<T> type)
T - the type of VarProperty to returntype - the class of VarProperty to return<T extends UniqueVarProperty> Optional<T> getProperty(Class<T> type)
T - the type of VarProperty to returntype - the class of VarProperty to return<T extends VarProperty> boolean hasProperty(Class<T> type)
Var has a VarProperty of the given typeT - the type of the VarPropertytype - the type of the VarPropertyVar has a VarProperty of the given type@CheckReturnValue <T extends VarProperty> VarAdmin mapProperty(Class<T> type, java.util.function.UnaryOperator<T> mapper)
Var with instances of the given VarProperty modified.T - the type of the VarPropertytype - the type of the VarPropertyVar has a VarProperty of the given typeOptional<ConceptId> getId()
Optional<TypeLabel> getTypeLabel()
Collection<VarAdmin> getInnerVars()
Collection<VarAdmin> getImplicitInnerVars()
String getPrintableName()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.