Package com.echonest.api.v4

Source Code of com.echonest.api.v4.TimedEvent

package com.echonest.api.v4;

import java.util.Map;

import com.echonest.api.v4.util.MQuery;

public class TimedEvent {

    private double start;
    private double duration;
    private double confidence;

    TimedEvent(Map map) {
        MQuery mq = new MQuery(map);
        start = mq.getDouble("start");
        duration = mq.getDouble("duration");
        confidence = mq.getDouble("confidence");
    }

    /**
     * @return the start
     */
    public double getStart() {
        return start;
    }

    /**
     * @return the duration
     */
    public double getDuration() {
        return duration;
    }

    /**
     * @return the confidence
     */
    public double getConfidence() {
        return confidence;
    }

    @Override
    public String toString() {
        return String.format("%.2f %.2f %.2f", start, duration, confidence);
    }
}
TOP

Related Classes of com.echonest.api.v4.TimedEvent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.