Commit 71568dfa authored by Liliya Givorgizova's avatar Liliya Givorgizova

Korrektur nach der Prüfung mit spotbugs:

- Für Klassen, die equals(Object) überschreiben wird auch hashCode() definiert.
parent 44b64c9b
/*
* Copyright (c) 2008 by inovat, Dipl.-Ing. H. C. Kniß
* ALL RIGHTS RESERVED.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL inovat OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCL., BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCL.
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.inovat.buv.plugin.gtm.navigation.tabellen;
//~ JDK IMPORTE ===============================================================
import java.util.Arrays;
//~ KLASSEN ===================================================================
/**
* Die Klasse repräsentiert ein Zeilenobjekt.
* @author inovat
* @author Dagmar Rostek (DR)
* @version $Revision$ / $Date$ / ($Author$)
*/
public class ZeilenObjekt {
/**
* Attributliste mit den Attributen einer Zeile.
*/
private Object[] _attributListe = null;
//~ KONSTRUKTOREN (und vom Konstruktor verwendete Methoden) ==============
public ZeilenObjekt() {}
public ZeilenObjekt(Object[] attributListe) {
_attributListe = attributListe;
}
//~ METHODEN ==============================================================
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ZeilenObjekt)) {
return false;
}
ZeilenObjekt that = (ZeilenObjekt) o;
return Arrays.equals(_attributListe, that._attributListe);
}
//~ GET METHODEN ==========================================================
/**
* Getter für Eigenschaft 'attributListe'.
*
* @return Wert der Eigenschaft 'attributListe'.
*
* @see #_attributListe
*/
public Object[] getAttributListe() {
return _attributListe;
}
//~ SET METHODEN ==========================================================
/**
* Setter für Eigenschaft 'attributListe'.
*
* @param attributListe Wert zum Setzen der Eigenschaft 'attributListe'.
*
* @see #_attributListe
*/
public void setAttributListe(Object[] attributListe) {
_attributListe = attributListe;
}
}
//~Formatiert mit 'inovat Kodierkonvention' am 11.12.18
/*
* Copyright (c) 2008 by inovat, Dipl.-Ing. H. C. Kniß
* ALL RIGHTS RESERVED.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL inovat OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCL., BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCL.
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.inovat.buv.plugin.gtm.navigation.tabellen;
//~ JDK IMPORTE ===============================================================
import java.util.Arrays;
//~ KLASSEN ===================================================================
/**
* Die Klasse repräsentiert ein Zeilenobjekt.
* @author inovat
* @author Dagmar Rostek (DR)
* @version $Revision$ / $Date$ / ($Author$)
*/
public class ZeilenObjekt {
/**
* Attributliste mit den Attributen einer Zeile.
*/
private Object[] _attributListe = null;
//~ KONSTRUKTOREN (und vom Konstruktor verwendete Methoden) ==============
public ZeilenObjekt() {}
public ZeilenObjekt(Object[] attributListe) {
_attributListe = attributListe;
}
//~ METHODEN ==============================================================
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ZeilenObjekt)) {
return false;
}
ZeilenObjekt that = (ZeilenObjekt) o;
return Arrays.equals(_attributListe, that._attributListe);
}
//~ GET METHODEN ==========================================================
/**
* Getter für Eigenschaft 'attributListe'.
*
* @return Wert der Eigenschaft 'attributListe'.
*
* @see #_attributListe
*/
public Object[] getAttributListe() {
return _attributListe;
}
//~ METHODEN ==============================================================
@Override
public int hashCode() {
return Arrays.hashCode(_attributListe);
}
//~ SET METHODEN ==========================================================
/**
* Setter für Eigenschaft 'attributListe'.
*
* @param attributListe Wert zum Setzen der Eigenschaft 'attributListe'.
*
* @see #_attributListe
*/
public void setAttributListe(Object[] attributListe) {
_attributListe = attributListe;
}
}
//~Formatiert mit 'inovat Kodierkonvention' am 31.10.19
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment