반응형
public class PutawayVO extends CommonVO {
private Long id;
private String name;
}
권장 패턴
@Getter
@Setter
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class PutawayVO extends CommonVO {
private Long id;
private String name;
}
가장 안전한 방식
list.removeIf(vo -> 조건);
ex ) list.removeIf(vo -> vo.getKey().equals(idx.getKey()));
callSuper = true 가 없을 때 발생하는 문제점
Collection API 오작동
API문제
| remove(Object) | 삭제 실패 |
| contains() | 존재 여부 false |
| indexOf() | -1 반환 |
| HashSet | 중복 객체 허용 |
| Map key | 동일 key 인식 실패 |
반응형
'교육' 카테고리의 다른 글
| Cloudflare Workers Wrangler 설정 파일 가이드 (0) | 2026.01.15 |
|---|---|
| ESLint 설정 파일 가이드 (0) | 2026.01.15 |
| React 정렬 방법 (0) | 2026.01.07 |
| mariadb에서 datetime 유형에서 특정 일자 이후 조건 예제 (0) | 2025.12.31 |
| intellij idea community edition 2025.2 버전 이하 Community 버전 다운로드 방법 (0) | 2025.12.26 |