Class FindPeaksOutput


  • public class FindPeaksOutput
    extends Object
    Represents the output of a peak-finding operation.

    This class encapsulates the indices of the midpoints of peaks and additional properties associated with the peaks.

    Properties may include various metrics or attributes related to the identified peaks, stored in a map structure with string keys and object values.

    • Constructor Detail

      • FindPeaksOutput

        public FindPeaksOutput​(int[] midpoints,
                               Map<String,​Object> properties)
        Constructs a new FindPeaksOutput object with the specified midpoints and properties.
        Parameters:
        midpoints - an array of integers representing the midpoints of the peaks
        properties - a map containing additional properties of the peaks
    • Method Detail

      • getMidpoints

        public int[] getMidpoints()
        Returns the indices of the midpoints of detected peaks.
        Returns:
        an array of integers representing the midpoints
      • getProperties

        public Map<String,​Object> getProperties()
        Returns the additional properties associated with the peaks.
        Returns:
        a map containing properties of the peaks
      • equals

        public boolean equals​(Object o)
        Compares this object to another object for equality.

        Two FindPeaksOutput objects are considered equal if:

        • Both have the same midpoints
        • Both have properties maps with the same keys and values
        • Array values in the properties maps are compared deeply

        Note: Two empty arrays are considered equal regardless of their types.

        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare to
        Returns:
        true if the objects are equal, false otherwise
      • hashCode

        public int hashCode()
        Computes the hash code for this FindPeaksOutput object.

        The hash code is computed using the midpoints array and the properties map.

        Overrides:
        hashCode in class Object
        Returns:
        the hash code value
      • toString

        public String toString()
        Returns a string representation of this FindPeaksOutput object.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object, including the midpoints array and properties map