일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- set
- app:compiledebugkotlin
- err_connection_refused
- forwardref type
- reactnative error
- TS
- app.post
- 타입스크립트
- extends
- 배열중복요소제거
- 상속
- 리액트네이티브아이콘
- map
- 안드로이드빌드에러
- reactnative
- array
- async
- react
- npm에러
- materialicons
- Next.js
- 이진탐색
- interface
- Spring
- Filter
- generic
- 슬라이딩윈도우
- 스크롤이벤트
- javascript
- mainapplication.kt
- Today
- Total
목록generic (2)
rhanziy
제네릭은 클래스와 메소드에서 사용할 수 있는데 제네릭 타입을 선언한 클래스를 제네릭 클래스라 한다. 제네릭 클래스를 이용하면 하나의 클래스에서 서로 다른 형태의 데이터 를 받아와 한꺼번에 처리할 수 있다. 기존의 인스턴스 변수를 Object 데이터 형식으로 지정해 받는다면 package Chap_09.coffee; public class CoffeeByName { public Object name; // Integer, Double, String ... public CoffeeByName(Object name) { this.name = name; } public void ready() { System.out.println("커피 준비 완료 : " + name); } } 주문고객 번호와 주문고객 이름을 확..
interface SStorage { [key:string] : T } class LocalStorage { private storage: SStorage = {} set(key:string, value:T){ this.storage[key] = value; } remove(key:string){ delete this.storage[key] } get(key:string):T { return this.storage[key] } clear(){ this.storage = {} } } const stringsStorage = new LocalStorage() stringsStorage.get("key") stringsStorage.set("hello", "how are you") const booleanSt..