Package pspdash.data

Examples of pspdash.data.ListData


    }

    protected Enumeration getInheritedPhaseList(String defectPath) {
        Object inheritedPhaseList = parent.data.getInheritableValue
            (defectPath, "Effective_Defect_Phase_List");
        ListData list = null;
        if (inheritedPhaseList instanceof ListData)
            list = (ListData) inheritedPhaseList;
        else if (inheritedPhaseList instanceof StringData)
            list = ((StringData) inheritedPhaseList).asList();

        if (list == null)
            return null;

        Vector result = new Vector();
        for (int i = 0;   i < list.size();   i++)
            result.add(list.get(i).toString());
        return result.elements();
    }
View Full Code Here


     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(java.util.List arguments, ExpressionContext context)
    {
        ListData result = new ListData();
        Iterator i = collapseLists(arguments, 0).iterator();
        while (i.hasNext())
            result.add(i.next());

        return result;
    }
View Full Code Here

        }

        // Iterate over the children of this element.
        NodeList children = node.getChildNodes();
        int numChildren = children.getLength();
        ListData childList = newEmptyList();
        Node c; Element child;
        for (int i=0;  i<numChildren;  i++) {
            c = children.item(i);
            if (c instanceof Element && isProcessNode((Element) c) &&
                !noAutoDataNode((Element) c)) {
                child = (Element) c;
                String childName =
                    pathConcat(path, child.getAttribute(NAME_ATTR));
                childList.add(childName);
                buildDefaultData(child, childName, data, definitions,
                                 localDataLength, nodeDefinitions);
            }
        }
        childList.setImmutable();

        // truncate the nodeDefinitions StringBuffer so it only
        // contains the global data definitions plus the local size
        // definition (probably unnecessary, but a wise and safe thing
        // to do).
        nodeDefinitions.setLength(localDataLength);

        if (XMLUtils.hasValue(path))
            nodeDefinitions.append("#define ").append(PATH_MACRO)
                .append(" ").append(esc(path)).append("\n");
        if (node.hasAttribute(PSPProperties.IMAGINARY_NODE_ATTR))
            nodeDefinitions.append("#define IS_IMAGINARY_NODE\n");

        if (childList.size() > 0) {
            definitions.put(pathConcat(path, CHILD_LIST_ELEM), childList);
            nodeDefinitions.append(NODE_DATA);
        } else {
            // This is a phase.
View Full Code Here

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(java.util.List arguments, ExpressionContext context)
    {
        ListData result = new ListData();
        Iterator i = collapseLists(arguments, 0).iterator();
        while (i.hasNext())
            result.setAdd(i.next());

        return result;
    }
View Full Code Here

        try {
            script = (CompiledScript) arguments.get(0);
        } catch (ClassCastException cce) { }
        if (script == null) return null;

        ListData result = new ListData();
        LocalExpressionContext lContext = new LocalExpressionContext(context);
        ListStack stack = new ListStack();
        Iterator i = collapseLists(arguments, 1).iterator();
        Object item;
        while (i.hasNext()) try {
View Full Code Here

            return null;
        }
    }

    public synchronized ListData getSaveList() {
        ListData result = new ListData();
        result.add(saveDate(get(0).endDate));
        Period p;
        for (int i = 1;   i < periods.size();  i++) {
            p = get(i);
            if (p.automatic)
                break;
            result.add(Double.toString(p.planTotalTime));
            result.add(saveDate(p.endDate));
        }
        result.setImmutable();
        return result;
    }
View Full Code Here

    }

    protected static List collapseLists(List arguments, int pos) {
        List result = new ArrayList();
        SimpleData arg;
        ListData argList;
        for (; pos < arguments.size();  pos++)
            appendToList(result, getArg(arguments, pos));
        return result;
    }
View Full Code Here

        }

        Object [] pairArray = pairs.toArray();
        Arrays.sort(pairArray);

        ListData result = new ListData();
        for (int j = 0;   j < pairArray.length;   j++)
            result.add(((Pair) pairArray[j]).prefix);
        result.setImmutable();

        return result;
    }
View Full Code Here

        if (val instanceof ListData)
            return (ListData) val;
        else if (val instanceof StringData)
            return ((StringData) val).asList();
        else
            return new ListData();
    }
View Full Code Here

        else
            return new ListData();
    }

    protected List getProcessListPlain(String name) {
        ListData list = getProcessList(name);
        List result = new LinkedList();
        for (int i = 0;  i < list.size();   i++)
            result.add(list.get(i));
        return result;
    }
View Full Code Here

TOP

Related Classes of pspdash.data.ListData

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.