/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; }
if (getContent() == null) { if (other.getContent() != null) { return false; } else if (!getContent().equals(other.getContent())) { return false;
if (getContent() == null) { if (other.getContent() != null) { return false; } else if (!getContent().equals(other.getContent())) { return false;
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#getAsType(java.lang.Class, org.jboss.shrinkwrap.api.Filter) */ @Override public <X extends Archive<X>> Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter) { Validate.notNull(type, "Type must be specified"); Validate.notNull(filter, "Filter must be specified"); Collection<X> archives = new ArrayList<X>(); Map<ArchivePath, Node> matches = getContent(filter); for (ArchivePath path : matches.keySet()) { archives.add(getAsType(type, path)); } return archives; }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#getAsType(java.lang.Class, org.jboss.shrinkwrap.api.Filter) */ @Override public <X extends Archive<X>> Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter) { Validate.notNull(type, "Type must be specified"); Validate.notNull(filter, "Filter must be specified"); Collection<X> archives = new ArrayList<X>(); Map<ArchivePath, Node> matches = getContent(filter); for (ArchivePath path : matches.keySet()) { archives.add(getAsType(type, path)); } return archives; }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#getAsType(java.lang.Class, org.jboss.shrinkwrap.api.Filter, * org.jboss.shrinkwrap.api.ArchiveFormat) */ @Override public <X extends Archive<X>> Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter, final ArchiveFormat archiveFormat) { Validate.notNull(type, "Type must be specified"); Validate.notNull(filter, "Filter must be specified"); Validate.notNull(archiveFormat, "ArchiveFormat must be specified"); Collection<X> archives = new ArrayList<X>(); Map<ArchivePath, Node> matches = getContent(filter); for (ArchivePath path : matches.keySet()) { archives.add(getAsType(type, path, archiveFormat)); } return archives; }
/** * {@inheritDoc} * * @see org.jboss.shrinkwrap.api.Archive#getAsType(java.lang.Class, org.jboss.shrinkwrap.api.Filter, * org.jboss.shrinkwrap.api.ArchiveFormat) */ @Override public <X extends Archive<X>> Collection<X> getAsType(Class<X> type, Filter<ArchivePath> filter, final ArchiveFormat archiveFormat) { Validate.notNull(type, "Type must be specified"); Validate.notNull(filter, "Filter must be specified"); Validate.notNull(archiveFormat, "ArchiveFormat must be specified"); Collection<X> archives = new ArrayList<X>(); Map<ArchivePath, Node> matches = getContent(filter); for (ArchivePath path : matches.keySet()) { archives.add(getAsType(type, path, archiveFormat)); } return archives; }