Open ljacqu opened 1 year ago
public static void main(String[] args) {
{
LinkedHashSet<String> seqColl = new LinkedHashSet<>(Arrays.asList("b"));
SequencedCollection<String> reversedCollection = seqColl.reversed();
reversedCollection.add("f");
System.out.println(reversedCollection); // Output: [f, b]
}
{
ArrayList<String> seqColl = new ArrayList<>(Arrays.asList("b"));
SequencedCollection<String> reversedCollection = seqColl.reversed();
reversedCollection.add("f");
System.out.println(reversedCollection); // Output: [b, f]
}
}
The tests focus on differences among implementations of the same interface, but it would be interesting to highlight some of the less obvious behavior that all implementations [should] share. Such as:
equals among collection types deserves its own test (probably its own issue)