src/main/java/se/kth/iv1351/weatherstat/integration/WeatherDAO.java
/**
     * Returns a list containing all stored temperature readings, in degrees
     * Celsius. A field in a stored observation is assumed to contain a temperature
     * if it's name is <code>temp</code>. The list is empty if there are no such
     * observations.
     * 
     * @return A list containing all stored temperature readings, in degrees
     *         Celsius.
     */
Returns a list containing all stored temperature readings, in degrees
Celsius. A field in a stored observation is assumed to contain a temperature
if it's name is temp. The list is empty if there are no such
observations.

@return A list containing all stored temperature readings, in degrees
Celsius.
Returns a list containing all stored temperature readings in degrees Celsius . A field in a stored observation is assumed to contain a temperature if it ' s name is temp . The list is empty if there are no such observations . @return A list containing all stored temperature readings in degrees Celsius .
public List<Double> findAllTempReadings() {
        MongoDatabase weatherDb = connection.getDatabase(DB_NAME);
        MongoCollection<Document> weatherColl = weatherDb.getCollection(COLLECTION_NAME);
        MongoCursor<Document> observations = weatherColl.find().iterator();
        List<Double> tempReadings = new ArrayList<>();
        while (observations.hasNext()) {
            Double tempReading = extractTempReading(observations.next());
            if (tempReading != null) {
                tempReadings.add(tempReading);
            }
        }
        return tempReadings;
    }
public List < Double > findAllTempReadings ( ) { MongoDatabase weatherDb = connection . getDatabase ( DB_NAME ) ; MongoCollection < Document > weatherColl = weatherDb . getCollection ( COLLECTION_NAME ) ; MongoCursor < Document > observations = weatherColl . find ( ) . iterator ( ) ; List < Double > tempReadings = new ArrayList < > ( ) ; while ( observations . hasNext ( ) ) { Double tempReading = extractTempReading ( observations . next ( ) ) ; if ( tempReading != null ) { tempReadings . add ( tempReading ) ; } } return tempReadings ; }
Returns a list containing all stored temperature readings, in degrees
 Celsius.
Returns a list containing all stored temperature readings in degrees Celsius .