I wish to:

  1. avoid duplicated item being inserted
  2. when I iterate through the collection class, the returned item is same as insertion order

What should I consider when choosing between ArrayList (explicitly performing contains check before insertion) or LinkedHashSet?

Edit
Report