Package it.unibo.alchemist.model
Object Node.Companion
-
- All Implemented Interfaces:
public class Node.Companion
Utilities for Nodes.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Node.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final <T extends Any, C extends NodeProperty<T>> C
asProperty(Node<T> $self)
returns a NodeProperty of the provided type C. final <T extends Any, C extends NodeProperty<T>> C
asPropertyOrNull(Node<T> $self)
returns a NodeProperty of the provided type C or null if the node does not have a compatible property. -
-
Method Detail
-
asProperty
final <T extends Any, C extends NodeProperty<T>> C asProperty(Node<T> $self)
returns a NodeProperty of the provided type C.
- Returns:
a capability of the provided type C
-
asPropertyOrNull
final <T extends Any, C extends NodeProperty<T>> C asPropertyOrNull(Node<T> $self)
returns a NodeProperty of the provided type C or null if the node does not have a compatible property.
- Returns:
if present, a capability of the provided type C
-
-
-
-