uk.ac.ebi.intenz.domain.enzyme
Class Cofactor

java.lang.Object
  extended by uk.ac.ebi.intenz.domain.enzyme.Cofactor
All Implemented Interfaces:
Viewable

public class Cofactor
extends Object
implements Viewable

Cofactors are compounds participating in the reaction and are represented by this class.

At the moment this class stores the cofactor string from ENZYME only. In future this string should be broken down into its components, i.e. compounds and the binary operators (AND/OR) between them.

Instances of this class are immutable.

Version:
$Revision: 1.2 $ $Date: 2008/01/28 12:33:00 $
Author:
Michael Darsow

Nested Class Summary
static class Cofactor.Operators
           
 
Constructor Summary
Cofactor(String cofactorValue, EnzymeSourceConstant source, EnzymeViewConstant view)
          Deprecated. use the valueOf method instead to call the private constructor
 
Method Summary
 boolean equals(Object o)
          Standard equals method.
 String getCofactorValue()
          Deprecated. use getCompound().getName() or toString() instead
 uk.ac.ebi.rhea.domain.Compound getCompound()
           
 EnzymeSourceConstant getSource()
           
 EnzymeViewConstant getView()
           
 int hashCode()
          Returns the hash code of this object.
 String toString()
           
static Cofactor valueOf(uk.ac.ebi.rhea.domain.Compound compound, EnzymeSourceConstant source, EnzymeViewConstant view)
          Builds a cofactor from the passed parameters.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cofactor

public Cofactor(String cofactorValue,
                EnzymeSourceConstant source,
                EnzymeViewConstant view)
Deprecated. use the valueOf method instead to call the private constructor

Returns a Cofactor instance defined by cofactorValue.

Parameters:
cofactorValue - The string representation of the cofactor(s).
Throws:
NullPointerException - if cofactorValue is null.
IllegalArgumentException - if cofactorValue is empty.
Method Detail

valueOf

public static Cofactor valueOf(uk.ac.ebi.rhea.domain.Compound compound,
                               EnzymeSourceConstant source,
                               EnzymeViewConstant view)
Builds a cofactor from the passed parameters.

Parameters:
compound -
source -
view -
Returns:
a new cofactor object

equals

public boolean equals(Object o)
Standard equals method.

Overrides:
equals in class Object
Parameters:
o - Object to be compared to this one.
Returns:
true if the objects are equal.

hashCode

public int hashCode()
Returns the hash code of this object.

Overrides:
hashCode in class Object
Returns:
the hash code of this object.

getCofactorValue

public String getCofactorValue()
Deprecated. use getCompound().getName() or toString() instead

Returns the cofactor string.

Returns:
the cofactor string.

getSource

public EnzymeSourceConstant getSource()

getView

public EnzymeViewConstant getView()
Specified by:
getView in interface Viewable

getCompound

public uk.ac.ebi.rhea.domain.Compound getCompound()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 EMBL-EBI. All Rights Reserved.