@Test public void testHashCodeDifferentPatternType() { final ArchiveIdentifierPattern ai1 = new ArchiveIdentifierPattern(ArchiveType.JAVA, PatternType.PATTERN_ON_FILENAME, "abc"); final ArchiveIdentifierPattern ai2 = new ArchiveIdentifierPattern(ArchiveType.JAVA, PatternType.PATTERN_ON_PATH, "abc"); Assert.assertNotEquals("hashCode()", ai1.hashCode(), ai2.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Objects.hash(pattern.pattern(), patternType); return result; }
ArchiveIdentifierPattern extends ArchiveIdentifier { @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Objects.hash(pattern.pattern(), patternType); return result; } }
ArchiveIdentifierPattern extends ArchiveIdentifier { @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Objects.hash(pattern.pattern(), patternType); return result; } ArchiveIdentifierPattern(final ArchiveType archiveType, final PatternType patternType, final String regex); }
ArchiveIdentifierPattern extends ArchiveIdentifier { @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Objects.hash(pattern.pattern(), patternType); return result; } ArchiveIdentifierPattern(final ArchiveType archiveType, final PatternType patternType, final String regex); final PatternType getPatternType(); final Pattern getPattern(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ArchiveIdentifierPattern extends ArchiveIdentifier { @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + Objects.hash(pattern.pattern(), patternType); return result; } ArchiveIdentifierPattern(final ArchiveType archiveType, final PatternType patternType, final String regex); final PatternType getPatternType(); final Pattern getPattern(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }