Skip to content

Instantly share code, notes, and snippets.

@ujhelyiz
ujhelyiz / IntLongWat.java
Created May 22, 2012 20:02 — forked from bergmanngabor/IntLongWat.java
Playing with semantic holes in Java's notions of equality
public class IntLongWat {
public static void main(String[] args) {
System.out.println(new Integer(1).equals(1));
// true
System.out.println(new Long(1).equals(1));
// false, it only equals 1L - so much for semantic equivalence
System.out.println(new Integer(1).equals(new Long(1)));
// false... Y U NO EQUAL?
@ujhelyiz
ujhelyiz / Ant Build script for EMF model building
Created December 12, 2010 22:30
A simple Ant script that can be used inside Eclipse as a builder for Ecore code generation.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Nov 16, 2010 10:33:34 PM
org.eclipse.viatra2.gtasm.model
A test build script to execute GTASM model generation
Zoltan Ujhelyi
====================================================================== -->
<project name="org.eclipse.viatra2.gtasm.model" default="default">