001 /*
002 * BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence. This should
006 * be distributed with the code. If you do not have a copy,
007 * see:
008 *
009 * http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors. These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 * http://www.biojava.org/
019 *
020 * Created on 01-21-2010
021 */
022 package org.biojava3.core.sequence.features;
023
024 import java.util.ArrayList;
025 import java.util.List;
026
027 import org.biojava3.core.sequence.template.AbstractSequence;
028 import org.biojava3.core.sequence.template.Compound;
029
030 /**
031 * It is common to have a numerical value or values associated with a feature. This can then
032 * be used in heat maps or other visual indicators when viewing a sequence. Multiple quantities
033 * could represent a time corse study and display a color gradient
034 * @author Scooter Willis <willishf at gmail dot com>
035 */
036 public class QuantityFeature<S extends AbstractSequence<C>, C extends Compound> extends AbstractFeature<S, C> {
037
038 private List<Number> quantities = new ArrayList<Number>();
039
040 /**
041 *
042 * @param type
043 * @param source
044 */
045 public QuantityFeature(String type, String source) {
046 super(type, source);
047 }
048
049 /**
050 *
051 * @param value
052 */
053 public void addQuantity(Number value) {
054 quantities.add(value);
055 }
056
057 /**
058 * @return the quantities
059 */
060 public List<Number> getQuantities() {
061 return quantities;
062 }
063
064 /**
065 * @param quantities the quantities to set
066 */
067 public void setQuantities(List<Number> quantities) {
068 this.quantities = quantities;
069 }
070 }