class

Similar::Algorithms::UniqueItem(T)

Inherits Reference < Object

Represents an item in the vector returned by unique.

It compares like the underlying item does it was created from but carries the index it was originally created from.

Constructors

new(lookup : T, index : Int32)
Source

Instance methods

==(other : UniqueItem) : Bool
Source
==(other : self)

Returns true if this reference is the same as other. Invokes same?.

hash(hasher)

See Object#hash(hasher)

index
Source
lookup
Source
original_index

Returns the original index.

Source
value

Returns the value.

Source