Package ptolemy.domains.metroII.kernel
Class MetroIIEventBuilder
- java.lang.Object
-
- ptolemy.domains.metroII.kernel.MetroIIEventBuilder
-
public class MetroIIEventBuilder extends java.lang.Object
MetroEventBuilder is a set of routines that create Metro events.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Liangpeng Guo
- Pt.AcceptedRating:
- Red (glp)
- Pt.ProposedRating:
- Red (glp)
-
-
Constructor Summary
Constructors Constructor Description MetroIIEventBuilder()
Constructs an event builder.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
atLeastOneNotified(java.lang.Iterable<metroIIcomm.Event.Builder> events)
Checks if at least one event is notified in the event vector.static metroIIcomm.Event.Builder
newProposedEvent(java.lang.String eventName)
Creates a proposed Metro event.static metroIIcomm.Event.Builder
newProposedEvent(java.lang.String eventName, long timeValue, double resolution)
Creates a proposed Metro event.static java.lang.String
trimModelName(java.lang.String name)
Trims the substring from the beginning to the first delimiter '.' from a given string.
-
-
-
Method Detail
-
newProposedEvent
public static metroIIcomm.Event.Builder newProposedEvent(java.lang.String eventName, long timeValue, double resolution)
Creates a proposed Metro event.- Parameters:
eventName
- The name of the eventtimeValue
- The time value of the eventresolution
- The resolution associated with the time value- Returns:
- A Metro event with the given name and the time tag
-
newProposedEvent
public static metroIIcomm.Event.Builder newProposedEvent(java.lang.String eventName)
Creates a proposed Metro event.- Parameters:
eventName
- The name of the event- Returns:
- A Metro event with the given name
-
trimModelName
public static java.lang.String trimModelName(java.lang.String name)
Trims the substring from the beginning to the first delimiter '.' from a given string. Example: XXX.YYY.ZZZ -> YYY.ZZZ- Parameters:
name
- The input string- Returns:
- The trimmed string
-
atLeastOneNotified
public static boolean atLeastOneNotified(java.lang.Iterable<metroIIcomm.Event.Builder> events)
Checks if at least one event is notified in the event vector.- Parameters:
events
- event vector to be checked.- Returns:
- true if there is at least one event notified.
-
-