Compares this Value Object with another for equality. Value Objects are equal if they are of the same type and all equality components match.
The other Value Object to compare with
true if the Value Objects are equal, false otherwise
StaticcreateCreates a URL instance with validation.
The URL string
Success with URL or Failure with DomainError
Gets a specific query parameter value.
The query parameter key
The parameter value or null if not found
Checks if the URL belongs to a specific domain.
The domain to check
true if the URL belongs to the domain
ProtectedgetReturns the components that determine equality for this Value Object. Two Value Objects are equal if all their equality components are equal.
An array of values used for equality comparison
Returns a string representation of an object.
Represents a valid URL with parsing capabilities.
URL is immutable and automatically validates the format. Provides convenient access to URL components like protocol, domain, path, etc.
Example