MCPcopy Create free account
hub / github.com/boazy/TWEditorEnhanced / setFloat

Method setFloat

src/main/java/DBList.java:285–299  ·  view source on GitHub ↗
(String label, float value)

Source from the content-addressed store, hash-verified

283 }
284
285 public void setFloat(String label, float value)
286 throws DBException
287 {
288 DBElement element = getElement(label);
289 if (element != null) {
290 int fieldType = element.getType();
291 if (fieldType == 8)
292 element.setValue(new Float(value));
293 else
294 throw new DBException("Field " + label + " is not floating-point");
295 }
296 else {
297 addElement(new DBElement(8, 0, label, new Float(value)));
298 }
299 }
300
301 public Object clone()
302 {

Callers

nothing calls this directly

Calls 4

getElementMethod · 0.95
getTypeMethod · 0.95
setValueMethod · 0.95
addElementMethod · 0.95

Tested by

no test coverage detected