/** * Test for a specific single value in the map. * <p> * NOTE: This is a SLOW operation, and is actively discouraged. * @param value the value to search for * @return true if contains simple value */ public boolean containsSimpleValue(V value) { for (List<V> vals : values()) { if ((vals.size() == 1) && vals.contains(value)) { return true; } } return false; }
/** * Get the already parsed parts. * @return the parts that were parsed */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<>(); for (List<Part> o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Parse, if necessary, the multipart data and return the list of Parts. * * @return the parts * @throws IOException if unable to get the parts */ public Collection<Part> getParts() throws IOException { if(!_parsed) parse(); throwIfError(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<>(); for (List<Part> o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * @return whether the list of parsed parts is empty */ public boolean isEmpty() { if (_parts == null) return true; Collection<List<Part>> values = _parts.values(); for (List<Part> partList : values) { if (partList.size() != 0) return false; } return true; }
/** * @return whether the list of parsed parts is empty */ public boolean isEmpty() { if (_parts == null) return true; Collection<List<Part>> values = _parts.values(); for (List<Part> partList : values) { if (partList.size() != 0) return false; } return true; }
/** * Test for a specific single value in the map. * <p> * NOTE: This is a SLOW operation, and is actively discouraged. * @param value * @return */ public boolean containsSimpleValue(V value) { for (List<V> vals : values()) { if ((vals.size() == 1) && vals.contains(value)) { return true; } } return false; }
/** * Test for a specific single value in the map. * <p> * NOTE: This is a SLOW operation, and is actively discouraged. * @param value * @return */ public boolean containsSimpleValue(V value) { for (List<V> vals : values()) { if ((vals.size() == 1) && vals.contains(value)) { return true; } } return false; }
/** * Test for a specific single value in the map. * <p> * NOTE: This is a SLOW operation, and is actively discouraged. * @param value * @return true if contains simple value */ public boolean containsSimpleValue(V value) { for (List<V> vals : values()) { if ((vals.size() == 1) && vals.contains(value)) { return true; } } return false; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (List<Part> o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return the parts that were parsed */ @Deprecated public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<>(); for (List<Part> o : values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * @return the parts that were parsed */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<>(); for (List<Part> o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Get the already parsed parts. * * @return */ public Collection<Part> getParsedParts() { if (_parts == null) return Collections.emptyList(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
MultiMap mhm = new MultiHashMap(); for ( string line: array) { String []pair = line.split(" "); mhm.put(pair[0],pair[1]); } for (Collection coll = (Collection) mhm.values() ) { //print all values from collection? }
/** * Parse, if necessary, the multipart data and return the list of Parts. * * @return * @throws IOException * @throws ServletException */ public Collection<Part> getParts() throws IOException, ServletException { parse(); Collection<Object> values = _parts.values(); List<Part> parts = new ArrayList<Part>(); for (Object o: values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }
/** * Parse, if necessary, the multipart data and return the list of Parts. * * @return the parts * @throws IOException if unable to get the parts */ public Collection<Part> getParts() throws IOException { if (!_parsed) parse(); throwIfError(); Collection<List<Part>> values = _parts.values(); List<Part> parts = new ArrayList<>(); for (List<Part> o : values) { List<Part> asList = LazyList.getList(o, false); parts.addAll(asList); } return parts; }