imitated functional interface to easy java convert between objects