API Reference 0.4.0memcached_clientSocketAddress

SocketAddress class

class SocketAddress {
 String host;
 int port;

 SocketAddress(this.host, this.port);

 String toUri() => '$host:$port';

 String toString() => toUri();

 @override
 int get hashCode => host.hashCode ^ port;

 bool operator ==(other) {
   if (identical(this, other)) return true;
   if (other is! SocketAddress) return false;

   return this.host == other.host
       && this.port == other.port;
 }
}

Constructors

new SocketAddress(String host, int port) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
SocketAddress(this.host, this.port);

Properties

final int hashCode #

Get a hash code for this object.

All objects have hash codes. Hash codes are guaranteed to be the same for objects that are equal when compared using the equality operator ==. Other than that there are no guarantees about the hash codes. They will not be consistent between runs and there are no distribution guarantees.

If a subclass overrides hashCode it should override the equality operator as well to maintain consistency.

docs inherited from Object
@override
int get hashCode => host.hashCode ^ port;

String host #

String host

int port #

int port

Operators

bool operator ==(other) #

The equality operator.

The default behavior for all Objects is to return true if and only if this and other are the same object.

If a subclass overrides the equality operator it should override the hashCode method as well to maintain consistency.

docs inherited from Object
bool operator ==(other) {
 if (identical(this, other)) return true;
 if (other is! SocketAddress) return false;

 return this.host == other.host
     && this.port == other.port;
}

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => toUri();

String toUri() #

String toUri() => '$host:$port';