1 21 package com.db4o.test.jdk5; 22 23 import static java.lang.Math .*; 25 26 import java.util.*; 27 28 @Jdk5Annotation( 30 cascadeOnActivate=true, 31 cascadeOnUpdate=true, 32 maximumActivationDepth=3) 33 34 public class Jdk5Data<Item> { 36 private Item item; 37 private Jdk5Enum type; 39 private List<Integer > list; 41 42 public Jdk5Data(Item item,Jdk5Enum type) { 43 this.item=item; 44 this.type=type; 45 list=new ArrayList<Integer >(); 46 } 47 48 public void add(int ... is) { 50 for(int i : is) { 52 list.add(i); 54 } 55 } 56 57 public int getMax() { 58 int max=Integer.MIN_VALUE; 59 61 for(int i : list) { 62 max=max(i,max); 63 } 64 65 return max; 66 } 67 68 public int getSize() { 69 return list.size(); 70 } 71 72 public Item getItem() { 73 return item; 74 } 75 76 public Jdk5Enum getType() { 77 return type; 78 } 79 } 80 | Popular Tags |