EMMA Coverage Report (generated Fri Feb 14 08:28:31 UTC 2014)
[all classes][org.qedeq.kernel.bo.logic.model]

COVERAGE SUMMARY FOR SOURCE FILE [UnaryDynamicModel.java]

nameclass, %method, %block, %line, %
UnaryDynamicModel.java100% (2/2)78%  (7/9)95%  (78/82)90%  (18/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UnaryDynamicModel100% (1/1)71%  (5/7)95%  (69/73)89%  (17/19)
comprehension (Entity []): Entity 0%   (0/1)0%   (0/2)0%   (0/1)
getDescription (): String 0%   (0/1)0%   (0/2)0%   (0/1)
<static initializer> 100% (1/1)100% (16/16)100% (2/2)
UnaryDynamicModel (): void 100% (1/1)100% (47/47)100% (12/12)
getFunction (int, int): Function 100% (1/1)100% (2/2)100% (1/1)
getFunctionConstant (ModelFunctionConstant): Function 100% (1/1)100% (2/2)100% (1/1)
getFunctionSize (int): int 100% (1/1)100% (2/2)100% (1/1)
     
class UnaryDynamicModel$1100% (1/1)100% (2/2)100% (9/9)100% (2/2)
UnaryDynamicModel$1 (int, int, String, String): void 100% (1/1)100% (7/7)100% (1/1)
map (Entity []): Entity 100% (1/1)100% (2/2)100% (1/1)

1/* This file is part of the project "Hilbert II" - http://www.qedeq.org
2 *
3 * Copyright 2000-2014,  Michael Meyling <mime@qedeq.org>.
4 *
5 * "Hilbert II" is free software; you can redistribute
6 * it and/or modify it under the terms of the GNU General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15 
16package org.qedeq.kernel.bo.logic.model;
17 
18/**
19 * A model for our mathematical world. It has only one entity.
20 *
21 * @author  Michael Meyling
22 */
23public final class UnaryDynamicModel extends DynamicModel {
24 
25    /** "Zero" or empty class. */
26    public static final Entity ZERO = new Entity(0, "0", "{} or empty set");
27 
28    /** Map to zero. */
29    public static final Function FUNCTION_ZERO = new Function(0, 99, "->0", "always 0") {
30        public Entity map(final Entity[] entities) {
31            return ZERO;
32        }
33    };
34 
35    /**
36     * Constructor.
37     */
38    public UnaryDynamicModel() {
39        super("one element");
40        addEntity(ZERO);
41 
42        // we don't need to add functions because we always return FUNCTION_ZERO
43 
44        addPredicate(0, FALSE);
45        addPredicate(0, TRUE);
46        addPredicate(1, FALSE);
47        addPredicate(1, TRUE);
48        addPredicate(2, FALSE);
49        addPredicate(2, TRUE);
50        addPredicate(3, FALSE);
51        addPredicate(3, TRUE);
52 
53        addPredicateConstant(new ModelPredicateConstant("in", 2), FALSE);
54 
55    }
56 
57    public String getDescription() {
58        return "This model has only one entity. The \" is element of\" relation is never fullfilled.";
59    }
60 
61    public int getFunctionSize(final int size) {
62        return 1;
63    }
64 
65    public Function getFunction(final int size, final int number) {
66        return FUNCTION_ZERO;
67    }
68 
69    public Function getFunctionConstant(final ModelFunctionConstant con) {
70        return FUNCTION_ZERO;
71    }
72 
73    public Entity comprehension(final Entity[] array) {
74        return ZERO;
75    }
76 
77}

[all classes][org.qedeq.kernel.bo.logic.model]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov