001/** 002 * DataElement -- Defines the interface in common to all data elements.. 003 * 004 * Copyright (C) 2003-2015, by Joseph A. Huwaldt. All rights reserved. 005 * 006 * This library is free software; you can redistribute it and/or modify it under the terms 007 * of the GNU Lesser General Public License as published by the Free Software Foundation; 008 * either version 2 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, but WITHOUT ANY 011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 012 * PARTICULAR PURPOSE. See the GNU Library General Public License for more details. 013 * 014 * You should have received a copy of the GNU Lesser General Public License along with 015 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - 016 * Suite 330, Boston, MA 02111-1307, USA. Or visit: http://www.gnu.org/licenses/lgpl.html 017 */ 018package jahuwaldt.js.datareader; 019 020import java.util.ResourceBundle; 021 022/** 023 * Defines the interface in common to all data elements. 024 * 025 * <p> Modified by: Joseph A. Huwaldt </p> 026 * 027 * @author Joseph A. Huwaldt, Date: March 5, 2003 028 * @version October 15, 2015 029 */ 030public interface DataElement extends Comparable<DataElement> { 031 032 /** 033 * The resource bundle for this package. 034 */ 035 public static final ResourceBundle RESOURCES = DataReader.RESOURCES; 036 037 /** 038 * Return the name of this data element. 039 */ 040 public CharSequence getName(); 041 042 /** 043 * Change the name of this data element to the specified name. 044 */ 045 public void setName(CharSequence newName); 046 047 /** 048 * Return any user defined object associated with this data element. If there is no 049 * user data, then null is returned. 050 */ 051 public Object getUserObject(); 052 053 /** 054 * Set the user defined object associated with this data element. This can be used to 055 * store any type of information with a data element that could be useful. 056 */ 057 public void setUserObject(Object data); 058}