xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::domain_up_down::item Class Reference
Inheritance diagram for xtd::forms::domain_up_down::item:
xtd::object xtd::icomparable< item > xtd::iequatable< item > xtd::interface xtd::extensions::comparison_operators< type_t, comparable_t > xtd::interface xtd::extensions::equality_operators< type_t, equatable_t >

Definition

Represent an item contained in the domain_up_down::object_collection collection.

Public Constructors

 item ()=default
 Initializes a new instance of the item class.
 
 item (const xtd::string &value)
 Initializes a new instance of the item class with specified value.
 
 item (const xtd::string &value, const std::any &tag)
 Initializes a new instance of the item class with specified value and tag.
 

Public Properties

virtual const xtd::stringvalue () const noexcept
 Gets the value of the item.
 
virtual std::any tag () const noexcept
 Gets the tag of the item.
 

Public Methods

int32 compare_to (const item &value) const noexcept override
 Compares the current instance with another object of the same type.
 
bool equals (const xtd::object &obj) const noexcept override
 Determines whether the specified object is equal to the current object.
 
bool equals (const item &other) const noexcept override
 Determines whether the specified object is equal to the current object.
 
xtd::size get_hash_code () const noexcept override
 Serves as a hash function for a particular type.
 
xtd::string to_string () const noexcept override
 Returns a string containing the vague of the item.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<class object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Public Member Functions inherited from xtd::icomparable< item >
virtual int32 compare_to (const item &obj) const noexcept=0
 Compares the current instance with another object of the same type.
 
- Public Member Functions inherited from xtd::iequatable< item >
virtual bool equals (const item &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
template<class object_a_t , class object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<class object_a_t , class object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Constructor & Destructor Documentation

◆ item() [1/3]

xtd::forms::domain_up_down::item::item ( )
default

Initializes a new instance of the item class.

◆ item() [2/3]

xtd::forms::domain_up_down::item::item ( const xtd::string value)

Initializes a new instance of the item class with specified value.

Parameters
valuea string that represent the item.

◆ item() [3/3]

xtd::forms::domain_up_down::item::item ( const xtd::string value,
const std::any &  tag 
)

Initializes a new instance of the item class with specified value and tag.

Parameters
valuea string that represent the item.
tagan object that contains data about the item.

Member Function Documentation

◆ value()

virtual const xtd::string & xtd::forms::domain_up_down::item::value ( ) const
virtualnoexcept

Gets the value of the item.

Returns
A xtd::string that represent the value of item.

◆ tag()

virtual std::any xtd::forms::domain_up_down::item::tag ( ) const
virtualnoexcept

Gets the tag of the item.

Returns
A std::any that represent the tag of item.

◆ compare_to()

int32 xtd::forms::domain_up_down::item::compare_to ( const item value) const
overridenoexcept

Compares the current instance with another object of the same type.

Parameters
objAn object to compare with this instance.
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
Value Condition
Less than zero This instance is less than obj.
Zero This instance is equal to obj.
Greater than zero This instance is greater than obj.

◆ equals() [1/2]

bool xtd::forms::domain_up_down::item::equals ( const xtd::object obj) const
overridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

Reimplemented from xtd::object.

◆ equals() [2/2]

bool xtd::forms::domain_up_down::item::equals ( const item other) const
overridenoexcept

Determines whether the specified object is equal to the current object.

Parameters
otherThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.

◆ get_hash_code()

xtd::size xtd::forms::domain_up_down::item::get_hash_code ( ) const
overridevirtualnoexcept

Serves as a hash function for a particular type.

Returns
A hash code for the current object.

Reimplemented from xtd::object.

◆ to_string()

xtd::string xtd::forms::domain_up_down::item::to_string ( ) const
overridevirtualnoexcept

Returns a string containing the vague of the item.

Returns
A string containing the value of the item.

Reimplemented from xtd::object.


The documentation for this class was generated from the following file: