我刚刚安装了 ta4j Technical Analysis lib 。它有一个名为TimeSeries. 当我尝试实现第一种方法时TimeSeries
String getName()
我收到以下错误:
无法降低来自 TimeSeries implaments org.ta4jcore.Timeserios.GetName 的内在方法的可见性
我的代码
import org.ta4j.core.*;
public class cMyChartVal implements TimeSeries {
/**
* @return the name of the series
*/
String getName()
{
return "TestSet";
}
.....
.....
}
TimeSeries 接口类
package org.ta4j.core;
import java.io.Serializable;
import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* Sequence of {@link Bar bars} separated by a predefined period (e.g. 15 minutes, 1 day, etc.)
* </p>
* Notably, a {@link TimeSeries time series} can be:
* <ul>
* <li>the base of {@link Indicator indicator} calculations
* <li>constrained between begin and end indexes (e.g. for some backtesting cases)
* <li>limited to a fixed number of bars (e.g. for actual trading)
* </ul>
*/
public interface TimeSeries extends Serializable {
/**
* @return the name of the series
*/
String getName();
/**
* @param i an index
* @return the bar at the i-th position
*/
Bar getBar(int i);
/**
* @return the first bar of the series
*/
default Bar getFirstBar() {
return getBar(getBeginIndex());
}
/**
* @return the last bar of the series
*/
default Bar getLastBar() {
return getBar(getEndIndex());
}
/**
* @return the number of bars in the series
*/
int getBarCount();
/**
* @return true if the series is empty, false otherwise
*/
default boolean isEmpty() {
return getBarCount() == 0;
}
HUH函数
相关分类