@Test void getBooleanType() { when(cell.getCellTypeEnum()).thenReturn(BOOLEAN); when(cell.getBooleanCellValue()).thenReturn(true); Object val = excelEntity.get("attr1"); assertNotNull(val); assertEquals("true", val); }
@Override public Object get(String attributeName) { if (cachedValueMap == null) { cachedValueMap = new LinkedHashMap<>(); } Object value; if (cachedValueMap.containsKey(attributeName)) { value = cachedValueMap.get(attributeName); } else { Integer col = colNamesMap.get(attributeName); if (col != null) { Cell cell = row.getCell(col); if (cell != null) { value = ExcelUtils.toValue(cell, cellProcessors); } else { value = null; } } else { value = null; } cachedValueMap.put(attributeName, value); } return value; }
ExcelEntity extends DynamicEntity { @Override public Object get(String attributeName) { if (cachedValueMap == null) { cachedValueMap = new LinkedHashMap<>(); } Object value; if (cachedValueMap.containsKey(attributeName)) { value = cachedValueMap.get(attributeName); } else { Integer col = colNamesMap.get(attributeName); if (col != null) { Cell cell = row.getCell(col); if (cell != null) { value = ExcelUtils.toValue(cell, cellProcessors); } else { value = null; } } else { value = null; } cachedValueMap.put(attributeName, value); } return value; } }
ExcelEntity extends DynamicEntity { @Override public Object get(String attributeName) { if (cachedValueMap == null) { cachedValueMap = new LinkedHashMap<>(); } Object value; if (cachedValueMap.containsKey(attributeName)) { value = cachedValueMap.get(attributeName); } else { Integer col = colNamesMap.get(attributeName); if (col != null) { Cell cell = row.getCell(col); if (cell != null) { value = ExcelUtils.toValue(cell, cellProcessors); } else { value = null; } } else { value = null; } cachedValueMap.put(attributeName, value); } return value; } ExcelEntity(
      Row row,
      Map<String, Integer> colNamesMap,
      List<CellProcessor> cellProcessors,
      EntityType entityType); }
ExcelEntity extends DynamicEntity { @Override public Object get(String attributeName) { if (cachedValueMap == null) { cachedValueMap = new LinkedHashMap<>(); } Object value; if (cachedValueMap.containsKey(attributeName)) { value = cachedValueMap.get(attributeName); } else { Integer col = colNamesMap.get(attributeName); if (col != null) { Cell cell = row.getCell(col); if (cell != null) { value = ExcelUtils.toValue(cell, cellProcessors); } else { value = null; } } else { value = null; } cachedValueMap.put(attributeName, value); } return value; } ExcelEntity(
      Row row,
      Map<String, Integer> colNamesMap,
      List<CellProcessor> cellProcessors,
      EntityType entityType); @Override Object get(String attributeName); @Override void set(String attributeName, Object value); @Override void set(Entity values); @Override String toString(); @Override Iterable<String> getAttributeNames(); }
ExcelEntity extends DynamicEntity { @Override public Object get(String attributeName) { if (cachedValueMap == null) { cachedValueMap = new LinkedHashMap<>(); } Object value; if (cachedValueMap.containsKey(attributeName)) { value = cachedValueMap.get(attributeName); } else { Integer col = colNamesMap.get(attributeName); if (col != null) { Cell cell = row.getCell(col); if (cell != null) { value = ExcelUtils.toValue(cell, cellProcessors); } else { value = null; } } else { value = null; } cachedValueMap.put(attributeName, value); } return value; } ExcelEntity(
      Row row,
      Map<String, Integer> colNamesMap,
      List<CellProcessor> cellProcessors,
      EntityType entityType); @Override Object get(String attributeName); @Override void set(String attributeName, Object value); @Override void set(Entity values); @Override String toString(); @Override Iterable<String> getAttributeNames();  }