Using java.util interfaces.