Class XYSequence

    • Constructor Detail

      • XYSequence

        public XYSequence()
        Initializes the sequence.
    • Method Detail

      • assign

        public void assign​(XYSequence other)
        Obtains the stored variables from the other data point, but not the actual data points.
        Parameters:
        other - the data point to get the values from
      • hasMappingX

        public boolean hasMappingX()
        Checks whether there are string mappings for the X values available.
        Returns:
        true if X mappings available
      • putMappingX

        public double putMappingX​(String s)
        Adds a X mapping for the given string.
        Parameters:
        s - the string to add the mapping for
        Returns:
        the generated mapping
      • removeMappingX

        public String removeMappingX​(double x)
        Removes a X mapping for the given value.
        Parameters:
        x - the mapping to remove
        Returns:
        the previous mapping string, if any
      • getMappingX

        public String getMappingX​(double key)
        Returns the X mapping associated with the key.
        Parameters:
        key - the mapping to look up
        Returns:
        the mapping
      • getLabelsX

        public List<String> getLabelsX()
        Returns all the labels for X.
        Returns:
        the labels
      • getMappingsX

        public gnu.trove.map.hash.TDoubleObjectHashMap<String> getMappingsX()
        Returns all the mappings for X.
        Returns:
        the mappings
      • hasMappingY

        public boolean hasMappingY()
        Checks whether there are string mappings for the Y values available.
        Returns:
        true if Y mappings available
      • putMappingY

        public double putMappingY​(String s)
        Adds a Y mapping for the given string.
        Parameters:
        s - the string to add the mapping for
        Returns:
        the generated mapping
      • removeMappingY

        public String removeMappingY​(double y)
        Removes a Y mapping for the given value.
        Parameters:
        y - the mapping to remove
        Returns:
        the previous mapping string, if any
      • getMappingY

        public String getMappingY​(double key)
        Returns the Y mapping associated with the key.
        Parameters:
        key - the mapping to look up
        Returns:
        the mapping
      • getLabelsY

        public List<String> getLabelsY()
        Returns all the labels for Y.
        Returns:
        the labels
      • getMappingsY

        public gnu.trove.map.hash.TDoubleObjectHashMap<String> getMappingsY()
        Returns all the mappings for Y.
        Returns:
        the mappings
      • modifiedListener

        protected boolean modifiedListener​(boolean modified)
        Method that gets notified about changes in the collection of data points. Invalidates the min/max and passes the modified state through.
        Overrides:
        modifiedListener in class AbstractDataContainer<XYSequencePoint>
        Parameters:
        modified - whether the action modified the collection
        Returns:
        the same as the input
      • invalidateMinMax

        protected void invalidateMinMax()
        Invalidates the min/max points.
      • validateMinMax

        protected void validateMinMax()
        Determines the min/max points.
      • getMinX

        public XYSequencePoint getMinX()
        Returns point with the minimum X.
        Returns:
        the point
      • getMaxX

        public XYSequencePoint getMaxX()
        Returns point with the maximum X.
        Returns:
        the point
      • getMinY

        public XYSequencePoint getMinY()
        Returns point with the minimum Y.
        Returns:
        the point
      • getMaxY

        public XYSequencePoint getMaxY()
        Returns point with the maximum Y.
        Returns:
        the point
      • find

        public XYSequencePoint find​(double x)
        Returns the SequencePoint with the exact number, null if not found.
        Parameters:
        x - the number to look for
        Returns:
        the SequencePoint or null if not found
      • findClosest

        public XYSequencePoint findClosest​(double x)
        Returns the SequencePoint with a number closest to the one provided.
        Parameters:
        x - the number to look for
        Returns:
        the SpectrumPoint