I've written plenty of whiteboarding interviews in something resembling Java and decided that I needed a tuple class, which for most purposes doesn't really exist in Java. So I just used the concept of a Tuple. I can say that most people on a whiteboarding interview panel don't really care if you borrow abstractions of ideas, the most I've been asked to do is define an interface for these implementations.
Honestly if they care that much about rote memorization of syntax, it's a red flag.