List의 특징 (반대의 특징을 갖고 있음) : 순서 유지하고 중복 허용
HashSet()
HashSet(Collection c) // 생성자를 가지고 있음
HashSet(int initialCapacity) // 초기용량
HashSet(int initialCapacity, float loadFactor) // 초기용량, 언제?
// 추가
boolean add(Object o)
// 합집합
boolean addAll(Collection c)
// 삭제
boolean remove(Object o)
// 교집합
boolean removeAll(Collection e)
// 조건부 삭제, 차집합
boolean retainAll(Collection c)
// 모두 삭제
void clear()
// 객체가 포함되어 있는지 알려줌 true/false
boolean contains(Object o)
// 컬렉션에 담긴 모든 객체가 포함되어있는지
boolean containsAll(Collection c)
// 컬렉션의 요소를 불러냄
lterator iterator()
// 비어있는지 확인하는 메서드
boolean isEmpty()
// 저장된 객체의 개수
int size()
// set에 저장된 객체를 객체배열로 반환
Object[] toArray()
Object[] toArray(Object[] a)
범위검색과 정렬에 유리한 컬렉션 클래스
from~to 10~20
HashSet보다 데이터 추가, 삭제에 시간이 더 걸림