samples/contravariance/src-api2.0/api/Contravariance.java
author Jaroslav Tulach <jtulach@netbeans.org>
Wed, 08 Aug 2012 22:06:45 +0200
changeset 389 2eae47c2bfc3
parent 379 b632733724a8
permissions -rw-r--r--
Andrei suggested to use better variable name than n1
jtulach@8
     1
package api;
jtulach@8
     2
jtulach@379
     3
public class Contravariance {
jtulach@379
     4
    private Contravariance() {
jtulach@8
     5
    }
jtulach@8
     6
jtulach@379
     7
    // BEGIN: variance.contravariance.v2
jtulach@389
     8
    public static boolean isPositive(Number aNumber) {
jtulach@389
     9
        return aNumber.doubleValue() > 0.0d;
jtulach@378
    10
    }
jtulach@379
    11
    // END: variance.contravariance.v2
jtulach@8
    12
}