Package edu.cmu.cs.stage3.alice.core

Examples of edu.cmu.cs.stage3.alice.core.Variable


  public Class getValueClass() {
    return Number.class;
  }
  protected abstract SpatialRelation getSpatialRelation();
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return new Double( subjectValue.getSpatialRelationDistance( getSpatialRelation(), objectValue, asSeenByValue ) );
  }
View Full Code Here


public abstract class SubjectAsSeenByQuestion extends SubjectQuestion {
  public final ReferenceFrameProperty asSeenBy = new ReferenceFrameProperty( this, "asSeenBy", null );
  protected abstract Object getValue( Transformable subjectValue, ReferenceFrame asSeenByValue );
  protected Object getValue( Transformable subjectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return getValue( subjectValue, asSeenByValue );
  }
View Full Code Here

  protected abstract SpatialRelation getSpatialRelation();
  public Class getValueClass() {
    return Boolean.class;
  }
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    if( subjectValue.isInSpatialRelationTo( getSpatialRelation(), objectValue, asSeenByValue ) ) {
      return Boolean.TRUE;
    } else {
      return Boolean.FALSE;
    }
View Full Code Here

    if( m_runtimeResponses.size() > 0 ) {
      if( multipleRuntimeResponsePolicy.getValue()==MultipleRuntimeResponsePolicy.IGNORE_MULTIPLE ) {
        return;
      }
    }
    Response response = triggerResponse.getResponseValue();
    if( response != null ) {
      Response.RuntimeResponse runtimeResponse = response.manufactureRuntimeResponse();
      m_runtimeResponses.addElement( runtimeResponse );
            m_runtimeResponseArray = null;
    }
  }
View Full Code Here

  }
  protected void internalSchedule( double t, double dt ) {
  }
  public void scheduled( edu.cmu.cs.stage3.alice.core.event.ScheduleEvent scheduleEvent ) {
    double t = scheduleEvent.getTime();
    Response responseValue = response.getResponseValue();
    if( responseValue != null && responseValue.isCommentedOut.booleanValue() ) {
      responseValue = null;
    }
    if( responseValue != null ) {
      if( m_runtimeResponse==null ) {
        m_runtimeResponse = responseValue.manufactureRuntimeResponse();
        m_runtimeResponse.prologue( t );
      }
      m_runtimeResponse.update( t );
      double timeRemaining = m_runtimeResponse.getTimeRemaining( t );
      if( timeRemaining<=0 ) {
View Full Code Here

    public Object getValue() {
        UserDefinedQuestion userDefinedQuestionValue = userDefinedQuestion.getUserDefinedQuestionValue();
        Behavior currentBehavior = null;
        World world = getWorld();
        if( world != null ) {
            Sandbox sandbox = world.getCurrentSandbox();
            if( sandbox!=null ) {
                currentBehavior = sandbox.getCurrentBehavior();
            } else {
                //System.err.println( "current sandbox is null" );
            }
        } else {
            //System.err.println( "world is null" );
View Full Code Here

public abstract class SetNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final SetProperty set = new SetProperty( this, "set", null );
  //protected abstract double getValue( Set set );
  protected abstract int getValue( Set set );
  public Object getValue() {
    Set setValue = set.getSetValue();
    if( setValue!=null ) {
            return new Integer( getValue( setValue ) );
    } else {
      return null;
    }
View Full Code Here

public abstract class SetBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final SetProperty set = new SetProperty( this, "set", null );
  protected abstract boolean getValue( Set set );
  public Object getValue() {
    Set setValue = set.getSetValue();
    if( setValue!=null ) {
            if( getValue( setValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

public abstract class StackNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final StackProperty stack = new StackProperty( this, "stack", null );
  //protected abstract double getValue( Stack stack );
  protected abstract int getValue( Stack stack );
  public Object getValue() {
    Stack stackValue = stack.getStackValue();
    if( stackValue!=null ) {
            return new Integer( getValue( stackValue ) );
    } else {
      return null;
    }
View Full Code Here

  protected abstract Object getValue( Stack stack );
    public Class getValueClass() {
        return stack.getStackValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Stack stackValue = stack.getStackValue();
    if( stackValue!=null ) {
            return getValue( stackValue );
    } else {
      return null;
    }
View Full Code Here

TOP

Related Classes of edu.cmu.cs.stage3.alice.core.Variable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.