templates.presentation
Class Helpers

java.lang.Object
  extended by templates.presentation.Helpers

public class Helpers
extends java.lang.Object

Helper methods for some UI elements.

Author:
Lenko Grigorov

Constructor Summary
Helpers()
           
 
Method Summary
static java.util.Set<java.lang.String> matchEvents(Connector c)
          Compute the set of event names which appear in both TemplateComponents connected by the given connector.
static java.util.Set<java.lang.String> matchEvents(java.util.Set<java.lang.String> leftEvents, java.util.Set<java.lang.String> rightEvents)
          Compute the set of event names which appear in both event name sets given.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helpers

public Helpers()
Method Detail

matchEvents

public static java.util.Set<java.lang.String> matchEvents(Connector c)
Compute the set of event names which appear in both TemplateComponents connected by the given connector. If a template component has an underlying model, the names of events from the model alphabet are compared, otherwise the events specified by the TemplateLinks in the connector are compared.

Parameters:
c - the connector
Returns:
the set of event names which appear in both TemplateComponents connected by the given connector

matchEvents

public static java.util.Set<java.lang.String> matchEvents(java.util.Set<java.lang.String> leftEvents,
                                                          java.util.Set<java.lang.String> rightEvents)
Compute the set of event names which appear in both event name sets given.

Parameters:
leftEvents - the first event name set
rightEvents - the second event name set
Returns:
the set of event names which appear in both event name sets given