|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| EverythingExists.java | - | 75% | 77,8% | 76,5% |
|
||||||||||||||
| 1 | /* $Id: EverythingExists.java,v 1.3 2008/01/26 12:39:09 m31 Exp $ | |
| 2 | * | |
| 3 | * This file is part of the project "Hilbert II" - http://www.qedeq.org | |
| 4 | * | |
| 5 | * Copyright 2000-2007, Michael Meyling <mime@qedeq.org>. | |
| 6 | * | |
| 7 | * "Hilbert II" is free software; you can redistribute | |
| 8 | * it and/or modify it under the terms of the GNU General Public | |
| 9 | * License as published by the Free Software Foundation; either | |
| 10 | * version 2 of the License, or (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | */ | |
| 17 | ||
| 18 | package org.qedeq.kernel.bo.logic; | |
| 19 | ||
| 20 | ||
| 21 | /** | |
| 22 | * This implementation gives always the answer <code>true</code> to the question | |
| 23 | * <em>exists this predicate?</em>. | |
| 24 | * | |
| 25 | * @version $Revision: 1.3 $ | |
| 26 | * @author Michael Meyling | |
| 27 | */ | |
| 28 | public final class EverythingExists implements ExistenceChecker { | |
| 29 | ||
| 30 | /** One and only instance. */ | |
| 31 | private static final ExistenceChecker ALWAYS = new EverythingExists(); | |
| 32 | ||
| 33 | /** | |
| 34 | * Hidden constructor. | |
| 35 | */ | |
| 36 | 1 | private EverythingExists() { |
| 37 | // nothing to do | |
| 38 | } | |
| 39 | ||
| 40 | 127 | public boolean predicateExists(final String name, final int arguments) { |
| 41 | 127 | return true; |
| 42 | } | |
| 43 | ||
| 44 | 0 | public boolean predicateExists(final Predicate predicate) { |
| 45 | 0 | return true; |
| 46 | } | |
| 47 | ||
| 48 | 7 | public boolean functionExists(final String name, final int arguments) { |
| 49 | 7 | return true; |
| 50 | } | |
| 51 | ||
| 52 | 0 | public boolean functionExists(final Function function) { |
| 53 | 0 | return true; |
| 54 | } | |
| 55 | ||
| 56 | 10 | public boolean classOperatorExists() { |
| 57 | 10 | return true; |
| 58 | } | |
| 59 | ||
| 60 | 74 | public boolean equalityOperatorExists() { |
| 61 | 74 | return true; |
| 62 | } | |
| 63 | ||
| 64 | 72 | public String getIdentityOperator() { |
| 65 | 72 | return NAME_EQUAL; |
| 66 | } | |
| 67 | ||
| 68 | /** | |
| 69 | * Get one instance of this class. | |
| 70 | * | |
| 71 | * @return Class instance. | |
| 72 | */ | |
| 73 | 72 | public static final ExistenceChecker getInstance() { |
| 74 | 72 | return ALWAYS; |
| 75 | } | |
| 76 | ||
| 77 | } |
|
||||||||||