Package edu.cmu.cs.stage3.util

Examples of edu.cmu.cs.stage3.util.StringObjectPair


    Class elementOverrideValueClass = null;
    String propertyNameValue = propertyName.getStringValue();
    if( propertyNameValue!=null ) {
      Element elementValue = element.getElementValue();
      if( elementValue!=null ) {
        Property property = elementValue.getPropertyNamed( propertyNameValue );
        if( property != null ) {
          elementOverrideValueClass = property.getDeclaredClass();
        } else {
          if( elementValue instanceof Expression ) {
            Class cls = ((Expression)elementValue).getValueClass();
            if( cls != null ) {
              elementOverrideValueClass = cls;
View Full Code Here


      return null;
    }
  }

  public Object getValue() {
    Property property = getPropertyValue();
    if( property != null ) {
      return property.getValue();
    } else {
      throw new RuntimeException();
      //return null;
    }
  }
View Full Code Here

      throw new RuntimeException();
      //return null;
    }
  }
  public Class getValueClass() {
    Property property = getPropertyValue();
    if( property != null ) {
      return property.getValueClass();
    } else {
            String propertyNameValue = propertyName.getStringValue();
            if( propertyNameValue != null ) {
                Class cls = element.getValueClass();
                if( edu.cmu.cs.stage3.alice.core.Element.class.isAssignableFrom( cls ) ) {
View Full Code Here

  public long m_clickTimeThreshold = 300;
  public int m_clickDistanceThresholdSquared = 100;

  public void manufactureAnyNecessaryDetails() {
    if( details.size()==2 ) {
      Question what = new PickQuestion();
      what.name.set( "what" );
      what.setParent( this );
      details.add( what );
    }
    for( int i=0; i<details.size(); i++ ) {
      Object o = details.get( i );
      if( o instanceof PickQuestion ) {
View Full Code Here

public abstract class QueueBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  protected abstract boolean getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            if( getValue( queueValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

  protected abstract Object getValue( Queue queue );
    public Class getValueClass() {
        return queue.getQueueValue().valueClass.getClassValue();
    }
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return getValue( queueValue );
    } else {
      return null;
    }
View Full Code Here

public abstract class QueueNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  //protected abstract double getValue( Queue queue );
  protected abstract int getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            return new Integer( getValue( queueValue ) );
    } else {
      return null;
    }
View Full Code Here

  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

TOP

Related Classes of edu.cmu.cs.stage3.util.StringObjectPair

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.