Pivotal GemFire Native .NET Reference  10.0.5
Apache::Geode::Client::CacheableString Class Reference

An immutable string wrapper that can serve as a distributable key object for caching as well as being a string value. More...

Inherits Apache::Geode::Client::IDataSerializablePrimitive, and Apache::Geode::Client::CacheableKey.

Public Member Functions

 CacheableString (array< Char >^ value)
 Allocates a new instance copying from the given character array. More...
 
 CacheableString (String^ value)
 Allocates a new instance copying from the given string. More...
 
virtual bool Equals (Apache::Geode::Client::ICacheableKey^ other) override
 Return true if this key matches other object. More...
 
virtual bool Equals (Object^ obj) override
 Return true if this key matches other object. More...
 
virtual System::Int32 GetHashCode () override
 Return the hashcode for this key. More...
 
virtual String ^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

static CacheableStringCreate (array< Char >^ value)
 Static function to create a new instance copying from the given character array. More...
 
static CacheableStringCreate (String^ value)
 Static function to create a new instance copying from the given string. More...
 
static bool IsNullOrEmpty (CacheableString^ value)
 Static function to check whether IsNullOrEmpty. More...
 
static operator CacheableKey^ (bool value)
 Implicit conversion operator from a boolean to a CacheableKey. More...
 
static operator CacheableKey^ (Byte value)
 Implicit conversion operator from a byte to a CacheableKey. More...
 
static operator CacheableKey^ (Char value)
 Implicit conversion operator from a character to a CacheableKey. More...
 
static operator CacheableKey^ (Double value)
 Implicit conversion operator from a double to a CacheableKey. More...
 
static operator CacheableKey^ (Single value)
 Implicit conversion operator from a float to a CacheableKey. More...
 
static operator CacheableKey^ (String^ value)
 Implicit conversion operator from a string to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int16 value)
 Implicit conversion operator from a 16-bit integer to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int32 value)
 Implicit conversion operator from a 32-bit integer to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int64 value)
 Implicit conversion operator from a 64-bit integer to a CacheableKey. More...
 
static operator String ^ (CacheableString^ str)
 Implicit conversion operator to underlying System.String. More...
 

Properties

bool IsWideString [get]
 True when the underlying C string is a wide-character string. More...
 
System::UInt32 Length [get]
 Gets the length of the underlying C string. More...
 
String^ Value [get]
 Gets the string value. More...
 

Detailed Description

An immutable string wrapper that can serve as a distributable key object for caching as well as being a string value.

Constructor & Destructor Documentation

◆ CacheableString() [1/2]

Apache::Geode::Client::CacheableString::CacheableString ( String^  value)

Allocates a new instance copying from the given string.

Parameters
valuethe string value of the new instance
Exceptions
IllegalArgumentExceptionif the provided string is null or has zero length

◆ CacheableString() [2/2]

Apache::Geode::Client::CacheableString::CacheableString ( array< Char >^  value)

Allocates a new instance copying from the given character array.

Parameters
valuethe character array value of the new instance
Exceptions
IllegalArgumentExceptionif the provided array is null or has zero length

Member Function Documentation

◆ Create() [1/2]

static CacheableString ^ Apache::Geode::Client::CacheableString::Create ( array< Char >^  value)
inlinestatic

Static function to create a new instance copying from the given character array.

Providing a null or zero size character array will return a null CacheableString object.

Parameters
valuethe character array value of the new instance

◆ Create() [2/2]

static CacheableString ^ Apache::Geode::Client::CacheableString::Create ( String^  value)
inlinestatic

Static function to create a new instance copying from the given string.

Providing a null or zero size string will return a null CacheableString object.

Parameters
valuethe string value of the new instance

◆ Equals() [1/2]

virtual bool Apache::Geode::Client::CacheableString::Equals ( Apache::Geode::Client::ICacheableKey other)
overridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying apache::geode::client::CacheableString object.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ Equals() [2/2]

virtual bool Apache::Geode::Client::CacheableString::Equals ( Object^  obj)
overridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying apache::geode::client::CacheableString object.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ GetHashCode()

virtual System::Int32 Apache::Geode::Client::CacheableString::GetHashCode ( )
overridevirtual

Return the hashcode for this key.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ IsNullOrEmpty()

static bool Apache::Geode::Client::CacheableString::IsNullOrEmpty ( CacheableString value)
inlinestatic

Static function to check whether IsNullOrEmpty.

This is similar to the C# string.IsNullOrEmpty method.

Parameters
valuethe CacheableString value to check

◆ operator CacheableKey^() [1/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( bool  value)
staticinherited

Implicit conversion operator from a boolean to a CacheableKey.

◆ operator CacheableKey^() [2/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Byte  value)
staticinherited

Implicit conversion operator from a byte to a CacheableKey.

◆ operator CacheableKey^() [3/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Char  value)
staticinherited

Implicit conversion operator from a character to a CacheableKey.

◆ operator CacheableKey^() [4/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Double  value)
staticinherited

Implicit conversion operator from a double to a CacheableKey.

◆ operator CacheableKey^() [5/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Single  value)
staticinherited

Implicit conversion operator from a float to a CacheableKey.

◆ operator CacheableKey^() [6/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( String^  value)
staticinherited

Implicit conversion operator from a string to a CacheableKey.

◆ operator CacheableKey^() [7/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int16  value)
staticinherited

Implicit conversion operator from a 16-bit integer to a CacheableKey.

◆ operator CacheableKey^() [8/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int32  value)
staticinherited

Implicit conversion operator from a 32-bit integer to a CacheableKey.

◆ operator CacheableKey^() [9/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int64  value)
staticinherited

Implicit conversion operator from a 64-bit integer to a CacheableKey.

◆ operator String ^()

static Apache::Geode::Client::CacheableString::operator String ^ ( CacheableString str)
inlinestatic

Implicit conversion operator to underlying System.String.

◆ ToString()

virtual String ^ Apache::Geode::Client::CacheableString::ToString ( )
inlineoverridevirtual

Return a string representation of the object.

This returns the same string as Value property.

Implements Apache::Geode::Client::ISerializable.

Property Documentation

◆ IsWideString

bool Apache::Geode::Client::CacheableString::IsWideString
get

True when the underlying C string is a wide-character string.

◆ Length

System:: UInt32 Apache::Geode::Client::CacheableString::Length
get

Gets the length of the underlying C string.

◆ Value

String^ Apache::Geode::Client::CacheableString::Value
get

Gets the string value.


Apache Geode C++ Cache .NET API Documentation