Logo Search packages:      
Sourcecode: cdk version File versions  Download package

RMap.java

/* $Revision: 7777 $ $Author: egonw $ $Date: 2007-01-29 13:49:49 +0100 (Mon, 29 Jan 2007) $
 *
 * Copyright (C) 2002-2007  Stephane Werner <mail@ixelis.net>
 *  
 * This code has been kindly provided by Stephane Werner 
 * and Thierry Hanser from IXELIS mail@ixelis.net.
 *  
 * IXELIS sarl - Semantic Information Systems
 *               17 rue des C?dres 67200 Strasbourg, France
 *               Tel/Fax : +33(0)3 88 27 81 39 Email: mail@ixelis.net
 *
 * CDK Contact: cdk-devel@lists.sf.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.openscience.cdk.isomorphism.mcss;

/**
 *  An RMap implements the association between an edge (bond) in G1 and an edge
 *  (bond) in G2, G1 and G2 being the compared graphs in a RGraph context.
 *
 * @author      Stephane Werner, IXELIS <mail@ixelis.net>
 * @cdk.created 2002-07-24
 * @cdk.module  standard
 */
00038 public class RMap {
  int id1 = 0;
  int id2 = 0;


  /**
   *  Constructor for the RMap
   *
   * @param  id1  number of the edge (bond) in the graphe 1
   * @param  id2  number of the edge (bond) in the graphe 2
   */
00049   public RMap(int id1, int id2) {
    this.id1 = id1;
    this.id2 = id2;
  }


  /**
   *  Sets the id1 attribute of the RMap object
   *
   * @param  id1  The new id1 value
   */
00060   public void setId1(int id1) {
    this.id1 = id1;
  }


  /**
   *  Sets the id2 attribute of the RMap object
   *
   * @param  id2  The new id2 value
   */
00070   public void setId2(int id2) {
    this.id2 = id2;
  }


  /**
   *  Gets the id1 attribute of the RMap object
   *
   * @return    The id1 value
   */
00080   public int getId1() {
    return id1;
  }


  /**
   *  Gets the id2 attribute of the RMap object
   *
   * @return    The id2 value
   */
00090   public int getId2() {
    return id2;
  }


  /**
   *  The equals method.
   *
   * @param  o  The object to compare.
   * @return    true=if both ids equal, else false.
   */
00101   public boolean equals(Object o) {
    if (((RMap) o).id1 == id1 && ((RMap) o).id2 == id2) {
      return (true);
    } else {
      return (false);
    }
  }
}


Generated by  Doxygen 1.6.0   Back to index