Package org.gradle.openapi.external.ui

Examples of org.gradle.openapi.external.ui.SettingsNodeVersion1


            return null;
        }

        String firstPathPortion = pathPortions[0];

        SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
        if (currentNode == null) {
            currentNode = addChild(firstPathPortion);
        }

        int index = 1;
        while (index < pathPortions.length) {
            String pathPortion = pathPortions[index];
            currentNode = currentNode.getChildNode(pathPortion);
            if (currentNode == null) {
                currentNode = addChild(firstPathPortion);
            }

            index++;
View Full Code Here


    public void setValueOfChildAsLong(String name, long value) {
        settingsNodeVersion1.setValueOfChildAsLong(name, value);
    }

    public SettingsNode getChildNode(String name) {
        SettingsNodeVersion1 childNode = settingsNodeVersion1.getChildNode(name);
        if (childNode == null) {
            return null;
        }

        return new SettingsNodeVersionWrapper(childNode);
View Full Code Here

    static List<SettingsNode> convertNodes(List<SettingsNodeVersion1> nodes) {
        List<SettingsNode> settingsNodes = new ArrayList<SettingsNode>();

        Iterator<SettingsNodeVersion1> iterator = nodes.iterator();
        while (iterator.hasNext()) {
            SettingsNodeVersion1 nodeVersion1 = iterator.next();
            settingsNodes.add(new SettingsNodeVersionWrapper(nodeVersion1));
        }

        return settingsNodes;
    }
View Full Code Here

    public SettingsNode addChildIfNotPresent(String name) {
        return new SettingsNodeVersionWrapper(settingsNodeVersion1.addChildIfNotPresent(name));
    }

    public SettingsNode getNodeAtPath(String... pathPortions) {
        SettingsNodeVersion1 node = settingsNodeVersion1.getNodeAtPath(pathPortions);
        if (node == null) {
            return null;
        }
        return new SettingsNodeVersionWrapper(node);
    }
View Full Code Here

    public String getValue() {
        return value;
    }

    public void setValueOfChild(String name, String value) {
        SettingsNodeVersion1 settingsNode = addChildIfNotPresent(name);
        settingsNode.setValue(value);
    }
View Full Code Here

        SettingsNodeVersion1 settingsNode = addChildIfNotPresent(name);
        settingsNode.setValue(value);
    }

    public String getValueOfChild(String name, String defaultValue) {
        SettingsNodeVersion1 settingsNode = getChildNode(name);
        if (settingsNode != null) {
            String value = settingsNode.getValue();
            if (value != null) {
                return value;
            }
        }
        return defaultValue;
View Full Code Here

    }

    public SettingsNodeVersion1 getChildNode(String name) {
        Iterator<SettingsNodeVersion1> iterator = children.iterator();
        while (iterator.hasNext()) {
            SettingsNodeVersion1 childNode = iterator.next();
            if (name.equals(childNode.getName())) {
                return childNode;
            }
        }
        return null;
    }
View Full Code Here

    public List<SettingsNodeVersion1> getChildNodes(String name) {
        List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();

        Iterator<SettingsNodeVersion1> iterator = children.iterator();
        while (iterator.hasNext()) {
            SettingsNodeVersion1 childNode = iterator.next();
            if (name.equals(childNode.getName())) {
                children.add(childNode);
            }
        }

        return children;
View Full Code Here

        return children;
    }

    public int getValueOfChildAsInt(String name, int defaultValue) {
        SettingsNodeVersion1 settingsNode = getChildNode(name);
        if (settingsNode != null) {
            String value = settingsNode.getValue();

            try {
                if (value != null) {
                    return Integer.parseInt(value);
                }
View Full Code Here

    public void setValueOfChildAsInt(String name, int value) {
        setValueOfChild(name, Integer.toString(value));
    }

    public long getValueOfChildAsLong(String name, long defaultValue) {
        SettingsNodeVersion1 settingsNode = getChildNode(name);
        if (settingsNode != null) {
            String value = settingsNode.getValue();

            try {
                if (value != null) {
                    return Long.parseLong(value);
                }
View Full Code Here

TOP

Related Classes of org.gradle.openapi.external.ui.SettingsNodeVersion1

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.