com.greenpepper.extensions.fit.Fit Maven / Gradle / Ivy
package com.greenpepper.extensions.fit;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import com.greenpepper.systemunderdevelopment.SystemUnderDevelopment;
import fit.ActionFixture;
import fit.TimedActionFixture;
/**
* Fit class.
*
* @author oaouattara
* @version $Id: $Id
*/
public class Fit
{
/** Constant format
*/
public static DateFormat format = new SimpleDateFormat("hh:mm:ss");
/**
* isATimedActionFitInterpreter.
*
* @param sud a {@link com.greenpepper.systemunderdevelopment.SystemUnderDevelopment} object.
* @param name a {@link java.lang.String} object.
* @return a boolean.
*/
public static boolean isATimedActionFitInterpreter(SystemUnderDevelopment sud, String name)
{
try
{
Object target = sud.getFixture(name).getTarget();
if (target instanceof TimedActionFixture)
return true;
}
catch (Throwable t)
{
}
return false;
}
/**
* isAnActionFitInterpreter.
*
* @param sud a {@link com.greenpepper.systemunderdevelopment.SystemUnderDevelopment} object.
* @param name a {@link java.lang.String} object.
* @return a boolean.
*/
public static boolean isAnActionFitInterpreter(SystemUnderDevelopment sud, String name)
{
try
{
Object target = sud.getFixture(name).getTarget();
if (target.getClass().equals(ActionFixture.class))
return false;
if (target instanceof ActionFixture)
return true;
}
catch (Throwable t)
{
}
return false;
}
/**
* isAFitInterpreter.
*
* @param sud a {@link com.greenpepper.systemunderdevelopment.SystemUnderDevelopment} object.
* @param name a {@link java.lang.String} object.
* @return a boolean.
*/
public static boolean isAFitInterpreter(SystemUnderDevelopment sud, String name)
{
try
{
Object target = sud.getFixture(name).getTarget();
if (target instanceof fit.Fixture && !target.getClass().equals(ActionFixture.class))
return true;
}
catch (Throwable t)
{
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy