EMMA Coverage Report (generated Sat Dec 08 18:09:47 GMT 2007) |
---|
[all classes][uk.co.zonetora.fj.util] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
Nothing.java | 0% (0/1) | 0% (0/6) | 0% (0/13) | 0% (0/6) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class Nothing | 0% (0/1) | 0% (0/6) | 0% (0/13) | 0% (0/6) |
Nothing (): void | 0% (0/1) | 0% (0/3) | 0% (0/1) | |
fromJust (): Object | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
fromMaybe (Object): Object | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
isJust (): boolean | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
isNothing (): boolean | 0% (0/1) | 0% (0/2) | 0% (0/1) | |
maybe (Object, Arrow): Object | 0% (0/1) | 0% (0/2) | 0% (0/1) |
1 | /* |
2 | * Created on 23 Oct 2007 |
3 | */ |
4 | package uk.co.zonetora.fj.util; |
5 | |
6 | public class Nothing<T> implements Maybe<T> { |
7 | |
8 | public T fromJust() { |
9 | return null; |
10 | } |
11 | |
12 | public boolean isJust() { |
13 | return false; |
14 | } |
15 | |
16 | public boolean isNothing() { |
17 | return true; |
18 | } |
19 | |
20 | public T fromMaybe(T defaultValue) { |
21 | return defaultValue; |
22 | } |
23 | |
24 | public <S> S maybe(S defaultValue, Arrow<T, S> code) { |
25 | return defaultValue; |
26 | } |
27 | |
28 | } |
[all classes][uk.co.zonetora.fj.util] |
EMMA 2.0.5312 (C) Vladimir Roubtsov |