| containsValue() | ใช้ตรวจสอบว่ามี value ที่กำหนดอยู่ใน hashtable หรือไม่ |
|---|
method:containsValue ( object_string_value );
return type:boolean
content:ใช้ตรวจสอบว่ามี value ที่กำหนดอยู่ใน hashtable หรือไม่
example:Hashtable hash = new Hashtable (); hash.put ( "bamboo", "ไม้ไผ่" ); hash.put ( "lab", "ห้องปฏิบัติการ" ); hash.put ( "code", "รหัส" ); if ( hash.containsValue ( "ไม้ไผ่" ) ) { System.out.println ( "ไม้ไผ่ is in hashtable." ); }