/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link: srcState.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link : state.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link: srcState.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link: srcState.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link : state.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Retrieves the first link with the supplied {@code rel} and/or * {@code type} value. * <p> * If either parameter is {@code null}, doesn't return matches * for that parameter. */ public Link getLink(String rel, String type) { for (Link link : state.links) { if (link.matches(rel, type)) { return link; } } return null; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : srcState.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : state.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : state.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : srcState.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : state.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Return the links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. * @return matching links. */ public List<Link> getLinks(String relToMatch, String typeToMatch) { List<Link> result = new ArrayList<Link>(); for (Link link : srcState.links) { if (link.matches(relToMatch, typeToMatch)) { result.add(link); } } return result; }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = state.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = srcState.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = srcState.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = srcState.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = state.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }
/** * Remove all links that match the given {@code rel} and {@code type} values. * * @param relToMatch {@code rel} value to match or {@code null} to match any * {@code rel} value. * @param typeToMatch {@code type} value to match or {@code null} to match any * {@code type} value. */ public void removeLinks(String relToMatch, String typeToMatch) { for (Iterator<Link> iterator = state.links.iterator(); iterator.hasNext();) { Link link = iterator.next(); if (link.matches(relToMatch, typeToMatch)) { iterator.remove(); } } }