Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.krischer.lecturate.data;
- import java.util.HashSet;
- import java.util.Set;
- /**
- *
- * @author tnt
- */
- public class LectureKey{
- private String key1;
- private String key2;
- private static final int keyCount = 2;
- private Set set = new HashSet(keyCount);
- public LectureKey(String key1, String key2) {
- this.key1 = key1;
- this.key2 = key2;
- this.set.add(key1);
- this.set.add(key2);
- }
- public boolean equals(String key) {
- if (key.equalsIgnoreCase(key1)
- || key.equalsIgnoreCase(key2)) {
- return true;
- }
- return false;
- }
- public Set getKeys() {
- return set;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement