gitignore added for Maven, Intellij and Eclipse files
compile error about unresolved method fixed
similar logic for exists and matchesall refactored
getRandom method to get a random element from collection