package com.tutego.insel.generics;

import java.awt.Point;

public class GenericBoxExample3
{
  @SuppressWarnings( {"unused", "unchecked" } )
  public static void main( String[] args )
  {
    Box stringBox = new Box<String>();
    Box pointBox  = new Box<Point>();
    Box objectBox = new Box();

    Box<String> stringBox2 = new Box<String>();
    Box         objectBox2 = stringBox2;

    objectBox2.setValue( new java.util.Date() ); // Warnung vor der „Unsafe type operation“
    String s = stringBox2.getValue();
    System.out.println( stringBox2.getValue() );
  }
}
