edu.ksu.cis.cadena.core
Class Util

java.lang.Object
  extended by edu.ksu.cis.cadena.core.Util

public class Util
extends java.lang.Object

This class provides a number of static helper methods. No non-static methods should live in this class.

Author:
Jesse Greenwald , Matt Hoosier

Constructor Summary
Util()
           
 
Method Summary
static java.util.Set<Style> getChildStyles(Style s)
           
static java.util.Set<Module> getDerivedModules(Style s)
           
static java.util.Set<Scenario> getDerivedScenarios(Style s)
           
static java.util.Collection<PropertyDeclaration> getPropertyTypes(java.util.Collection<PropertySheet> propertySheets, Kind kind, PropertyKind propertyKind)
           
static java.util.Collection<PropertyDeclaration> getPropertyTypes(PropertySheet propertySheet, Kind kind, PropertyKind propertyKind)
           
static
<T> java.util.Collection<T>
getTypes(java.util.Collection collection, java.lang.Class<T> clazz)
          Filters a collection.
static boolean isAssignmentCompatible(MetaKind lValue, MetaKind rValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getTypes

public static <T> java.util.Collection<T> getTypes(java.util.Collection collection,
                                                   java.lang.Class<T> clazz)
Filters a collection.

Type Parameters:
T - Should match clazz
Parameters:
collection - The collection to filter
clazz - The type of objects to include in the filtered collection
Returns:
The filtered collection

isAssignmentCompatible

public static boolean isAssignmentCompatible(MetaKind lValue,
                                             MetaKind rValue)

getChildStyles

public static java.util.Set<Style> getChildStyles(Style s)

getDerivedModules

public static java.util.Set<Module> getDerivedModules(Style s)

getDerivedScenarios

public static java.util.Set<Scenario> getDerivedScenarios(Style s)

getPropertyTypes

public static java.util.Collection<PropertyDeclaration> getPropertyTypes(PropertySheet propertySheet,
                                                                         Kind kind,
                                                                         PropertyKind propertyKind)

getPropertyTypes

public static java.util.Collection<PropertyDeclaration> getPropertyTypes(java.util.Collection<PropertySheet> propertySheets,
                                                                         Kind kind,
                                                                         PropertyKind propertyKind)