Examples of arrayValue()


Examples of com.dtrules.interpreter.RArray.arrayValue()

            RArray array = (RArray)action;
            if(stack.contains(array))return;    // We have already been here.
            stack.add(array);
            try {     // As this is an array, arrayValue() will not ever throw an exception
                @SuppressWarnings({"unchecked"})
                Iterator objects = array.arrayValue().iterator();
                while(objects.hasNext()){
                    addTables((IRObject) objects.next(),stack,tables);
                }
            } catch (RulesException e) { }
        }
View Full Code Here

Examples of com.dtrules.interpreter.RArray.arrayValue()

      Remove() {super("remove");}
     
      public void execute(DTState state) throws RulesException {
        IRObject            value   = state.datapop();
        RArray              rarray  = (RArray)state.datapop();
                ArrayList<IRObject> array   = rarray.arrayValue();
                boolean removed = false;
                if(value!=null){
          for(int i=0; i<array.size();){
            if(value.equals((IRObject)array.get(i))){
                            if(state.testState(DTState.TRACE)){
View Full Code Here

Examples of com.dtrules.interpreter.RArray.arrayValue()

                RArray    rarray  = (RArray)state.datapop();
                if(position >= rarray.size()){
                    state.datapush(RBoolean.getRBoolean(false));
                }
               
                ArrayList<IRObject> array   = rarray.arrayValue();
                   if(state.testState(DTState.TRACE)){
                       state.traceInfo("removed", "arrayID",rarray.getID()+"","position",position+"",null);
                   }
               
                array.remove(position);       
View Full Code Here

Examples of com.dtrules.interpreter.RArray.arrayValue()

      public void execute(DTState state) throws RulesException {
        boolean asc  = state.datapop().booleanValue();
        int direction = asc ? 1 : -1;
       
        RArray rarray             = state.datapop().rArrayValue();
        ArrayList<IRObject> array = rarray.arrayValue();
       
                if(state.testState(DTState.TRACE)){
                   state.traceInfo("sort", "length",array.size()+"","arrayID",rarray.getID()+"",asc ? "true" : "false");
                }
View Full Code Here

Examples of com.dtrules.interpreter.RArray.arrayValue()

    public void execute(DTState state) throws RulesException {
      boolean asc = state.datapop().booleanValue();
      RName rname = state.datapop().rNameValue();
      RArray rarray = state.datapop().rArrayValue();
      ArrayList<IRObject> array = rarray.arrayValue();
      if (state.testState(DTState.TRACE)) {
        state.traceInfo("sortentities", "length", array.size() + "", "by", rname.stringValue(), "arrayID",
                rarray.getID() + "", asc ? "true" : "false");
      }
      REntity temp = null;
View Full Code Here

Examples of com.voyagegames.core.json.JsonValue.arrayValue()

   
    final JsonValue v = obj.values.get(JsonParser.ARRAY_RESULT);
   
    assertTrue(v != null);
    assertTrue(v.type() == JsonValueType.ARRAY);
    assertTrue(v.arrayValue().size() == 2);
    assertTrue(v.arrayValue().get(0).type() == JsonValueType.OBJECT);
    assertTrue(v.arrayValue().get(1).type() == JsonValueType.OBJECT);
  }

  @Test
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

     * with an unrecognized parameter.
     */
    public void attributeChanged(Attribute attribute) throws IllegalActionException  {
        if (attribute == numerator) {
            ArrayToken numeratorValue = (ArrayToken)numerator.getToken();
            $ASSIGN$_numerator(numeratorValue.arrayValue());
        } else if (attribute == denominator) {
            ArrayToken denominatorValue = (ArrayToken)denominator.getToken();
            $ASSIGN$_denominator(denominatorValue.arrayValue());
            if (!_denominator[0].isEqualTo(_denominator[0].one()).booleanValue()) {
                try {
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        if (attribute == numerator) {
            ArrayToken numeratorValue = (ArrayToken)numerator.getToken();
            $ASSIGN$_numerator(numeratorValue.arrayValue());
        } else if (attribute == denominator) {
            ArrayToken denominatorValue = (ArrayToken)denominator.getToken();
            $ASSIGN$_denominator(denominatorValue.arrayValue());
            if (!_denominator[0].isEqualTo(_denominator[0].one()).booleanValue()) {
                try {
                    MessageHandler.warning("First denominator value is required to be 1. " + "Using 1.");
                } catch (CancelException ex) {
                    throw new IllegalActionException(this, "Canceled parameter change.");
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        int outputWidth = 0;
        Token[][] inputs = new Token[width][];
        for (int i = 0; i < width; i++) {
            if (input.hasToken(i)) {
                ArrayToken token = (ArrayToken) input.get(i);
                inputs[i] = token.arrayValue();
                outputWidth += inputs[i].length;
            }
        }
        Token[] array = new Token[outputWidth];
        int runningPosition = 0;
View Full Code Here

Examples of ptolemy.data.ArrayToken.arrayValue()

        _updateInitialTrace();

        // Produce the data on the output so that this can be used in
        // feedback look in dataflow models.
        ArrayToken arrayToken = (ArrayToken) initialTrace.getToken();
        output.send(0, arrayToken.arrayValue(), arrayToken.length());

        _count = 0;
    }

    /** Override the base class to create an initial trace.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.