|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.core.windows.persistence.convert; /** * Class of mode config properties for communication with persistence management. * It keeps data which are read/written from/in .wsmode xml file. * * @author Marek Slama */ public class ModeConfigOld { /** True if XML file was found and successfuly parsed. */ boolean initialized = false; /** Name of mode. Supposed to be internally for mode identification. */ public String name; /** */ public int frameType; public int containerType; /** Array of TCRefConfigOld. */ public TCRefConfigOld[] tcRefConfigs; /** Creates a new instance of ModeConfigOld */ public ModeConfigOld () { name = ""; // NOI18N tcRefConfigs = new TCRefConfigOld[0]; } public boolean equals (Object obj) { if (this == obj) { return true; } if (!(obj instanceof ModeConfigOld)) { return false; } ModeConfigOld modeCfg = (ModeConfigOld) obj; if (initialized != modeCfg.initialized) { return false; } if (!name.equals(modeCfg.name)) { return false; } if (frameType != modeCfg.frameType) { return false; } //Order of tcRefConfigs array is NOT defined if (tcRefConfigs.length != modeCfg.tcRefConfigs.length) { return false; } for (int i = 0; i < tcRefConfigs.length; i++) { TCRefConfigOld tcRefCfg = null; for (int j = 0; j < modeCfg.tcRefConfigs.length; j++) { if (tcRefConfigs[i].tc_id.equals(modeCfg.tcRefConfigs[j].tc_id)) { tcRefCfg = modeCfg.tcRefConfigs[j]; break; } } if (tcRefCfg == null) { return false; } if (!tcRefConfigs[i].equals(tcRefCfg)) { return false; } } return true; } public int hashCode() { int hash = 17; hash = 37 * hash + (initialized ? 0 : 1); hash = 37 * hash + name.hashCode(); hash = 37 * hash + frameType; for (int i = 0; i < tcRefConfigs.length; i++) { hash = 37 * hash + tcRefConfigs[i].hashCode(); } return hash; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.