Home > Contents > Index >
FTValList.getValString
Gets the string value that is associated with the specified key.
Syntax
public String getValString(String key)Parameters
key
- The name of the key.
Returns
The
String
value associated with the key. If the associatedFTVAL
is of typeFTVAL.I4
, the integer is converted to a string and returned. If the key is not found, or theFTVAL
is not a string or an integer, then null is returned.Example
The following code constructs a tiny list and then calls
getValString
to retrieve the value associated with the sole key:
String aKey = "DMajor"; String aValue = "Sonata for Two UNIX Boxes"; FTValList MyTinyList = new FTValList(8); MyTinyList.setValString(aKey, aValue); // Now retrieve the value associated with DMajor String RetrievedValue = MyTinyList.getValString(aKey);After running this code,
RetrievedValue
should hold:
Sonata for Two UNIX Boxes
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.