Package com.cumulocity.me.lang

Examples of com.cumulocity.me.lang.ArrayList


        }
        return uri;
    }

    private List findDelta(Collection in, Collection from) {
        List delta = new ArrayList();
        Iterator fromIterator = from.iterator();
        while (fromIterator.hasNext()) {
            String p = (String) fromIterator.next();
            boolean found = false;
           
            Iterator inIterator = in.iterator();
            while (!found && inIterator.hasNext()) {
                found = p.equals((String) inIterator.next());
            }
           
            if (!found) {
                delta.add(p);
            }
        }
        return delta;
    }
View Full Code Here


    }

    private List getQueryParams(String queryUri) {
        String tUri = queryUri.substring(queryUri.indexOf('?') + 1);
        String[] uriParams = StringUtils.split(tUri, "&");
        List queryParams = new ArrayList();
        for (int i = 0; i < uriParams.length; i++) {
            String up = uriParams[i];
            String[] params = StringUtils.split(up, "=");
            queryParams.add(params[0]);
        }
        return queryParams;
    }
View Full Code Here

public class ManagedObjectCollectionRepresentation extends BaseCollectionRepresentation {

    private List managedObjects;
   
    public ManagedObjectCollectionRepresentation() {
        managedObjects = new ArrayList();
    }
View Full Code Here

public class ManagedObjectReferenceCollectionRepresentation extends BaseCollectionRepresentation {
 
  private List references;
 
  public ManagedObjectReferenceCollectionRepresentation() {
    this.references = new ArrayList();
  }
View Full Code Here

    public void setAlarmsForSourceAndStatusAndTime(String alarmsForSourceAndStatusAndTime) {
        this.alarmsForSourceAndStatusAndTime = alarmsForSourceAndStatusAndTime;
    }

    public List getURITemplates() {
        List uriTemplates = new ArrayList();
        uriTemplates.add(getAlarmsForSource());
        uriTemplates.add(getAlarmsForSourceAndStatus());
        uriTemplates.add(getAlarmsForSourceAndStatusAndTime());
        uriTemplates.add(getAlarmsForSourceAndTime());
        uriTemplates.add(getAlarmsForStatus());
        uriTemplates.add(getAlarmsForStatusAndTime());
        uriTemplates.add(getAlarmsForTime());
        return uriTemplates;
    }
View Full Code Here

        this.eventsForSourceAndDateAndFragmentTypeAndType = eventsForSourceAndDateAndFragmentTypeAndType;
    }

//    @JSONProperty(ignore = true)
    public List getURITemplates() {
        List uriTemplates = new ArrayList();
        uriTemplates.add(this.getEventsForDateAndFragmentType());
        uriTemplates.add(this.getEventsForDateAndFragmentTypeAndType());
        uriTemplates.add(this.getEventsForFragmentType());
        uriTemplates.add(this.getEventsForFragmentTypeAndType());
        uriTemplates.add(this.getEventsForSource());
        uriTemplates.add(this.getEventsForSourceAndDateAndFragmentType());
        uriTemplates.add(this.getEventsForSourceAndDateAndFragmentTypeAndType());
        uriTemplates.add(this.getEventsForSourceAndFragmentType());
        uriTemplates.add(this.getEventsForSourceAndFragmentTypeAndType());
        uriTemplates.add(this.getEventsForSourceAndTime());
        uriTemplates.add(this.getEventsForSourceAndTimeAndType());
        uriTemplates.add(this.getEventsForSourceAndType());
        uriTemplates.add(this.getEventsForTime());
        uriTemplates.add(this.getEventsForTimeAndType());
        uriTemplates.add(this.getEventsForType());
        return uriTemplates;
    }
View Full Code Here

    public void shouldBuildUrlForOneParameter() throws Exception {
        // given
        Map filters = new HashMap();
        filters.put("a", "b");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?a={a}");

        String[] optionalParameters = new String[] {};

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

        // given
        Map filters = new HashMap();
        filters.put("a", "b");
        filters.put("c", "d");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?a={a}&c={c}");

        String[] optionalParameters = new String[] {};

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

        // given
        Map filters = new HashMap();
        filters.put("s", "b");
        filters.put("f", "d");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?a={a}&c={c}");

        String[] optionalParameters = new String[] {};

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

        // given
        Map filters = new HashMap();
        filters.put("a", "b");
        filters.put("c", "d");

        List uriTemplates = new ArrayList();
        uriTemplates.add("http://something?a={a}&c={c}");

        String[] optionalParameters = new String[] { "c" };

        QueryURLBuilder urlBuilder = new QueryURLBuilder(new TemplateUrlParser(), filters, uriTemplates, optionalParameters);
View Full Code Here

TOP

Related Classes of com.cumulocity.me.lang.ArrayList

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.