glib-2.0 Reference Manual

Synopsis

public class HashTable < K, V >  : Boxed  {
    public                              HashTable                 ( HashFunc            hash_func,
                                                                    EqualFunc           key_equal_func ) ;
    public                              HashTable.full            ( HashFunc            hash_func,
                                                                    EqualFunc           key_equal_func,
                                                                    DestroyNotify?      key_destroy_func,
                                                                    DestroyNotify?      value_destroy_func ) ;


    public    void                      insert                    ( K                   key,
                                                                    V                   value ) ;
    public    void                      replace                   ( K                   key,
                                                                    V                   value ) ;
    public    weak V                    lookup                    ( K                   key ) ;
    public    bool                      remove                    ( K                   key ) ;
    public    void                      remove_all                (  ) ;
    public    List< K >                 get_keys                  (  ) ;
    public    List< V >                 get_values                (  ) ;
    public    void                      for_each                  ( HFunc               func,
                                                                    void**              user_data ) ;
    public    uint                      size                      (  ) ;
}

HashTable Description

Details

Constructor Details

HashTable ()
    public                              HashTable                 ( HashFunc            hash_func,
                                                                    EqualFunc           key_equal_func ) ;		

HashTable.full ()
    public                              HashTable.full            ( HashFunc            hash_func,
                                                                    EqualFunc           key_equal_func,
                                                                    DestroyNotify?      key_destroy_func,
                                                                    DestroyNotify?      value_destroy_func ) ;		

Field Details

Signal Details

Property Details

Method Details

insert ()
    public    void                      insert                    ( K                   key,
                                                                    V                   value ) ;		

replace ()
    public    void                      replace                   ( K                   key,
                                                                    V                   value ) ;		

lookup ()
    public    weak V                    lookup                    ( K                   key ) ;		

remove ()
    public    bool                      remove                    ( K                   key ) ;		

remove_all ()
    public    void                      remove_all                (  ) ;		

get_keys ()
    public    List< K >                 get_keys                  (  ) ;		

get_values ()
    public    List< V >                 get_values                (  ) ;		

for_each ()
    public    void                      for_each                  ( HFunc               func,
                                                                    void**              user_data ) ;		

size ()
    public    uint                      size                      (  ) ;		


Created by Valadoc