sergAccount

Untitled

Aug 30th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.spec.model;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Holder<K> {
  13.     // Holder - обобщенный (универсальный) класс
  14.     // K - универсальный параметр (можем подставить любой тип)
  15.    
  16.     private K i; // переменная типа Integer
  17.  
  18.     public Holder(K i) {
  19.         this.i = i;
  20.     }
  21.     //
  22.     public K getI() {
  23.         return i;
  24.     }
  25.     public void setI(K i) {
  26.         this.i = i;
  27.     }
  28. }
  29.  
Add Comment
Please, Sign In to add comment