com.aspose.note.infrastructure

Class SequencedDictionary<TKey,TValue>

  • java.lang.Object
    • com.aspose.note.infrastructure.SequencedDictionary<TKey,TValue>
  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TValue>, com.aspose.ms.System.Collections.IEnumerable<TValue>, Iterable<TValue>


    public class SequencedDictionary<TKey,TValue>
    extends Object
    implements com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TValue>

    Represents a sequence of elements that can be accessed by key.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(TKey key, TValue value)
      Adds the node corresponding to the specified key.
      com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair<TKey,TValue>> asKeyValuePairEnumerable()
      Returns an enumerator that iterates through child elements of the SequencedDictionary{TKey, TValue}.
      TValue at(int index)
      Gets the element by the given index.
      boolean containsKey(TKey key)
      Gets a value indicating whether the SequencedDictionary{TKey, TValue} contains the element corresponding to the specified key.
      TValue first()
      Gets the first child element of the SequencedDictionary{TKey, TValue}.
      TValue get_Item(TKey key)
      Gets the node by the specified key.
      int getCount()
      Gets the number of elements contained in the SequencedDictionary{TKey, TValue}.
      com.aspose.ms.System.Collections.Generic.IGenericList<TKey> getKeys()
      Gets the collection of keys associated with elements contained in the SequencedDictionary{TKey, TValue}.
      com.aspose.ms.System.Collections.Generic.IGenericList<TValue> getValues()
      Gets the collection of elements contained in the SequencedDictionary{TKey, TValue}.
      int indexOf(TValue value)
      Returns the index of the specified element.
      int indexOfKey(TKey key)
      Returns the index of the element corresponding to the specified key.
      void insert(int index, TKey key, TValue value)
      Inserts the node corresponding to the specified key to the specified position.
      com.aspose.ms.System.Collections.Generic.IGenericEnumerator<TValue> iterator()
      Returns an enumerator that iterates through child elements of the SequencedDictionary{TKey, TValue}.
      TValue last()
      Gets the last child element of the SequencedDictionary{TKey, TValue}.
      void remove(TKey key)
      Removes the node corresponding to the specified key.
      void removeAt(int index)
      Removes the node corresponding to the specified index.
      void sort(Comparator<TValue> comparator)
      Sorts the elements in the sequence using the specified comparison.
      TValue[] toArray()
      Returns an array of elements contained in the SequencedDictionary{TKey, TValue}.
    • Constructor Detail

      • SequencedDictionary

        public SequencedDictionary()
    • Method Detail

      • getCount

        public int getCount()

        Gets the number of elements contained in the SequencedDictionary{TKey, TValue}.

      • getValues

        public com.aspose.ms.System.Collections.Generic.IGenericList<TValue> getValues()

        Gets the collection of elements contained in the SequencedDictionary{TKey, TValue}.

      • getKeys

        public com.aspose.ms.System.Collections.Generic.IGenericList<TKey> getKeys()

        Gets the collection of keys associated with elements contained in the SequencedDictionary{TKey, TValue}.

      • get_Item

        public TValue get_Item(TKey key)

        Gets the node by the specified key.

      • at

        public TValue at(int index)

        Gets the element by the given index.

      • first

        public TValue first()

        Gets the first child element of the SequencedDictionary{TKey, TValue}.

      • last

        public TValue last()

        Gets the last child element of the SequencedDictionary{TKey, TValue}.

      • toArray

        public TValue[] toArray()

        Returns an array of elements contained in the SequencedDictionary{TKey, TValue}.

      • iterator

        public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<TValue> iterator()

        Returns an enumerator that iterates through child elements of the SequencedDictionary{TKey, TValue}.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<TValue>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<TValue>
        Specified by:
        iterator in interface Iterable<TValue>
      • asKeyValuePairEnumerable

        public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair<TKey,TValue>> asKeyValuePairEnumerable()

        Returns an enumerator that iterates through child elements of the SequencedDictionary{TKey, TValue}.

      • containsKey

        public boolean containsKey(TKey key)

        Gets a value indicating whether the SequencedDictionary{TKey, TValue} contains the element corresponding to the specified key.

      • add

        public void add(TKey key,
                        TValue value)

        Adds the node corresponding to the specified key.

      • insert

        public void insert(int index,
                           TKey key,
                           TValue value)

        Inserts the node corresponding to the specified key to the specified position.

      • remove

        public void remove(TKey key)

        Removes the node corresponding to the specified key.

      • removeAt

        public void removeAt(int index)

        Removes the node corresponding to the specified index.

      • indexOf

        public int indexOf(TValue value)

        Returns the index of the specified element.

      • indexOfKey

        public int indexOfKey(TKey key)

        Returns the index of the element corresponding to the specified key.

      • sort

        public void sort(Comparator<TValue> comparator)

        Sorts the elements in the sequence using the specified comparison.