if (type == Float.TYPE) { tempval = (wgqueue_float.size() < amount); } else if (type == Integer.TYPE) { tempval = (wgqueue_int.size() < amount); } else if (type == Double.TYPE) { tempval = (wgqueue_double.size() < amount); } else if (type == Boolean.TYPE) { tempval = (wgqueue_boolean.size() < amount); } else if (type == Short.TYPE) { tempval = (wgqueue_short.size() < amount); } else if (type == Character.TYPE) { tempval = (wgqueue_char.size() < amount); } else if (type == Bit.TYPE) { tempval = (wgqueue_bit.size() < amount); } else { tempval = (queue.size() < amount); }
tempval = myqueue.size() < amount;
    void ensureData (int amount)    {        boolean tempval;        if (type == Float.TYPE) {            tempval = (wgqueue_float.size() < amount);        } else if (type == Integer.TYPE) {            tempval = (wgqueue_int.size() < amount);        } else if (type == Double.TYPE) {            tempval = (wgqueue_double.size() < amount);        } else if (type == Boolean.TYPE) {            tempval = (wgqueue_boolean.size() < amount);        } else if (type == Short.TYPE) {            tempval = (wgqueue_short.size() < amount);        } else if (type == Character.TYPE) {            tempval = (wgqueue_char.size() < amount);        } else if (type == Bit.TYPE) {            tempval = (wgqueue_bit.size() < amount);        } else {            tempval = (queue.size() < amount);        }        while (tempval)            {                assert source != null;                if (maxSize!=-1) {                    // give a better error message                    ERROR("ERROR:\n" +                           "Trying to pop or peek beyond the declared rate in stream " + sink + "\n" +                          "Make sure that your pop/peek statements match the declared rates.\n" +                          "\n" +                          "Internal message:\n" +                          "maxSize should equal -1 " +                          "(representing not a scheduled buffer)\n" +                          "Queue: " + queue +                          ".size: " + queue.size() +                          " amount is: " + amount +                          " and maxSize is: " + maxSize);                }                source.doWork();                if (type == Float.TYPE) {                    tempval = (wgqueue_float.size() < amount);                } else if (type == Integer.TYPE) {                    tempval = (wgqueue_int.size() < amount);                } else if (type == Double.TYPE) {                    tempval = (wgqueue_double.size() < amount);                } else if (type == Boolean.TYPE) {                    tempval = (wgqueue_boolean.size() < amount);                } else if (type == Short.TYPE) {                    tempval = (wgqueue_short.size() < amount);                } else if (type == Character.TYPE) {                    tempval = (wgqueue_char.size() < amount);                } else if (type == Bit.TYPE) {                    tempval = (wgqueue_bit.size() < amount);                } else {                    tempval = (queue.size() < amount);                }            }    }