Class DefaultTextHttpMessageLocation

    • Constructor Detail

      • DefaultTextHttpMessageLocation

        public DefaultTextHttpMessageLocation​(HttpMessageLocation.Location location,
                                              int start,
                                              int end,
                                              java.lang.String value)
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: MessageLocation
        Gets the description of this location in the message.

        Should be internationalised as it might be shown in GUI components.

        Examples, of possible descriptions:

        Example 1: This message location represents a POST parameter, in an HTTP message, it could return:

         POST parameter
         

        Example 2: It's manually selected a value of a HTTP request header, it could return:

         Header [start index, end index]
         

        For text selections is advised to return the coordinates of the selected content or position.

        Specified by:
        getDescription in interface MessageLocation
        Returns:
        the description of the location in the message
      • getValue

        public java.lang.String getValue()
        Description copied from interface: MessageLocation
        Gets the value represented by this location. It might be empty if it represents an insertion position.
        Specified by:
        getValue in interface MessageLocation
        Returns:
        the value represented by this location, empty if a position
      • overlaps

        public boolean overlaps​(MessageLocation otherLocation)
        Description copied from interface: MessageLocation
        Tells whether or not the given location overlaps with this location.

        Locations of non compatible types (for example, text and AMF) should return true.

        Specified by:
        overlaps in interface MessageLocation
        Parameters:
        otherLocation - other location to test for overlapping
        Returns:
        true if the otherLocation overlaps with this one, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object