Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | Properties | List of all members
Joutsen.Collections.Generic.Indexable< IndexType, ItemType > Interface Template Reference

An interface describing collections whose items can be accessed by index. More...

Public Member Functions

IndexType IndexOf (ItemType item)
 Fetches the index of an itemin the list. More...
 
IndexType IndexOf (ItemType item, IEqualityComparer< ItemType > comparer)
 Fetches the index of an item in the list using a custom comparer. More...
 

Properties

int Count [get]
 Determines the number of values in the list. More...
 
ItemType this[IndexType index] [get]
 Fetches the value associated with the index. More...
 

Detailed Description

An interface describing collections whose items can be accessed by index.

Since
0.4.0

Member Function Documentation

◆ IndexOf() [1/2]

IndexType Joutsen.Collections.Generic.Indexable< IndexType, ItemType >.IndexOf ( ItemType  item)

Fetches the index of an itemin the list.

Parameters
itemthe item to search for
Returns
the index of the item or -1 if it is not in the list

◆ IndexOf() [2/2]

IndexType Joutsen.Collections.Generic.Indexable< IndexType, ItemType >.IndexOf ( ItemType  item,
IEqualityComparer< ItemType >  comparer 
)

Fetches the index of an item in the list using a custom comparer.

Parameters
itemthe item to search for
comparerthe instance used to compare the item to the items in the list
Returns
the index of the item or -1 if it is not in the list

Property Documentation

◆ Count

int Joutsen.Collections.Generic.Indexable< IndexType, ItemType >.Count
get

Determines the number of values in the list.

◆ this[IndexType index]

ItemType Joutsen.Collections.Generic.Indexable< IndexType, ItemType >.this[IndexType index]
get

Fetches the value associated with the index.