Enum ContextScope
- java.lang.Object
-
- java.lang.Enum<ContextScope>
-
- nl.tudelft.simulation.naming.context.event.ContextScope
-
- All Implemented Interfaces:
Serializable,Comparable<ContextScope>
public enum ContextScope extends Enum<ContextScope>
ContextScope defines the area of interest for a Listener for the EventContextInterface. Events can be generated for the current node, for all nodes on the current level (excluding or including the node itself), or for the subtree starting at the current node.Copyright (c) 2020-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Alexander Verbraeck
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LEVEL_OBJECT_SCOPEEnum constant for expressing interest in events concerning objects in the context named by the target, including the context named by the target.LEVEL_SCOPEEnum constant for expressing interest in events concerning objects in the context named by the target, excluding the context named by the target.OBJECT_SCOPEEnum constant for expressing interest in events concerning the object named by the target.SUBTREE_SCOPEEnum constant for expressing interest in events concerning objects in the subtree of the object named by the target, including the object named by the target.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContextScopevalueOf(String name)Returns the enum constant of this type with the specified name.static ContextScope[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OBJECT_SCOPE
public static final ContextScope OBJECT_SCOPE
Enum constant for expressing interest in events concerning the object named by the target.
-
LEVEL_SCOPE
public static final ContextScope LEVEL_SCOPE
Enum constant for expressing interest in events concerning objects in the context named by the target, excluding the context named by the target.
-
LEVEL_OBJECT_SCOPE
public static final ContextScope LEVEL_OBJECT_SCOPE
Enum constant for expressing interest in events concerning objects in the context named by the target, including the context named by the target.
-
SUBTREE_SCOPE
public static final ContextScope SUBTREE_SCOPE
Enum constant for expressing interest in events concerning objects in the subtree of the object named by the target, including the object named by the target.
-
-
Method Detail
-
values
public static ContextScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContextScope c : ContextScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContextScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-