1 /* This file is part of the project "Hilbert II" - http://www.qedeq.org" target="alexandria_uri">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 16 package org.qedeq.kernel.bo.logic.model; 17 18 /** 19 * One entity in our model. 20 * 21 * @author Michael Meyling 22 */ 23 public final class Entity { 24 25 /** Value. This can be used for calculating truth or other values. Each value should 26 * be unique to an entity.*/ 27 private final int value; 28 29 /** Display text. */ 30 private final String display; 31 32 /** Description for this entity. */ 33 private final String description; 34 35 /** 36 * Constructor. 37 * @param value This can be used for calculating truth or other values. Each value 38 * should be unique to an entity. 39 * @param display Show this to represent the entity within outputs. 40 * @param description Description for this entity. 41 */ 42 public Entity(final int value, final String display, final String description) { 43 this.value = value; 44 this.display = display; 45 this.description = description; 46 } 47 48 /** 49 * Get value. This can be used for calculating truth or other values. Each value 50 * should be unique to an entity. 51 * 52 * @return Unique value for this entity. 53 */ 54 public int getValue() { 55 return value; 56 } 57 58 /** 59 * Get display text. 60 * 61 * @return Representation of this entity for textual output. 62 */ 63 public String toString() { 64 return display; 65 } 66 67 /** 68 * Get description. 69 * 70 * @return Description of this entity. 71 */ 72 public String getDescription() { 73 return description; 74 } 75 76 }