net.sourceforge.cilib.bioinf.rnaprediction
Class RNAConformation

java.lang.Object
  extended by net.sourceforge.cilib.type.types.container.Set<RNAStem>
      extended by net.sourceforge.cilib.bioinf.rnaprediction.RNAConformation
All Implemented Interfaces:
Serializable, Iterable<RNAStem>, StructuredType<RNAStem>, Randomizable, Type, Cloneable

public class RNAConformation
extends Set<RNAStem>

See Also:
Serialized Form

Constructor Summary
RNAConformation()
          Create an instance of a RNAConformation.
 
Method Summary
 boolean contains(NucleotidePair pair)
          Determine if the current RNAConformation contains the provided NucleotidePair.
 boolean equals(Object other)
          Compare the specified object with this type for equality.
 char[] getCharRepresentation()
          Get the character representation of the current RNAConformation.
 RNAConformation getClone()
          Create a cloned copy of the current object and return it.
 int getNumOfPairs()
          Get the number of pairs within this RNAConformation.
 int hashCode()
          Returns the hash code value for this list.
 void isInvalid()
          Determine if the current RNAConformation is valid.
 int length()
          Get the length of the current RNAConformation.
 
Methods inherited from class net.sourceforge.cilib.type.types.container.Set
accept, add, addAll, clear, contains, getDimension, getRepresentation, isEmpty, isInsideBounds, iterator, randomise, randomize, remove, remove, removeAll, reset, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RNAConformation

public RNAConformation()
Create an instance of a RNAConformation.

Method Detail

length

public int length()
Get the length of the current RNAConformation.

Returns:
The length of the RNAConformation.

getCharRepresentation

public char[] getCharRepresentation()
Get the character representation of the current RNAConformation.

Returns:
The RNAConformation represented by a character array.

getClone

public RNAConformation getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface StructuredType<RNAStem>
Specified by:
getClone in interface Type
Specified by:
getClone in interface Cloneable
Overrides:
getClone in class Set<RNAStem>
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

equals

public boolean equals(Object other)
Description copied from class: Set
Compare the specified object with this type for equality. Returns true if and only if the specified object is also an instance of the same type.

Specified by:
equals in interface Type
Overrides:
equals in class Set<RNAStem>
Parameters:
other - The object to compare.
Returns:
true if equality exists, false otherwise.
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from class: Set
Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:
  int hashCode = 7;
  Iterator<E> i = list.iterator();
  while (i.hasNext()) {
      E obj = i.next();
      hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
  }
 
This ensures that type1.equals(type2) implies that type1.hashCode()==type2.hashCode() for any two types, type1 and type2, as required by the general contract of Object.hashCode().

Specified by:
hashCode in interface Type
Overrides:
hashCode in class Set<RNAStem>
Returns:
the hash code value for this list
See Also:
Object.equals(Object), Type.equals(Object)

isInvalid

public void isInvalid()
Determine if the current RNAConformation is valid.

Throws:
RuntimeException - if an invalid confirmation is created.

contains

public boolean contains(NucleotidePair pair)
Determine if the current RNAConformation contains the provided NucleotidePair.

Parameters:
pair - The NucleotidePair to test.
Returns:
true if the RNAConformation contains the NucleotidePair, false otherwise.

getNumOfPairs

public int getNumOfPairs()
Get the number of pairs within this RNAConformation.

Returns:
The number of pairs.


Copyright © 2009 CIRG. All Rights Reserved.