Class Anchor

java.lang.Object
com.mastfrog.url.Anchor
All Implemented Interfaces:
URLComponent, Serializable

public class Anchor extends Object implements URLComponent
Author:
tim
See Also:
  • Constructor Details

    • Anchor

      public Anchor(String anchor)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isValid

      public boolean isValid()
      Description copied from interface: URLComponent
      Determine if this component is in compliance with the RFCs governing URLs and DNS.
      Specified by:
      isValid in interface URLComponent
      Returns:
      True if this component is valid.
    • getComponentName

      public String getComponentName()
      Description copied from interface: URLComponent
      Get a human-readable, localized name for this part of the URL. Useful if an error message needs to be shown.
      Specified by:
      getComponentName in interface URLComponent
      Returns:
      The component name
    • appendTo

      public void appendTo(StringBuilder sb)
      Description copied from interface: URLComponent
      Append this component to a StringBuilder.
      Specified by:
      appendTo in interface URLComponent
      Parameters:
      sb - A StringBuilder
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object