Skip to content

Commit

Permalink
Merge branch 'feature/remove-woodstox-header'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCookieLab committed Sep 23, 2024
2 parents 156ad65 + c9a3187 commit 178e99e
Show file tree
Hide file tree
Showing 536 changed files with 670 additions and 7,556 deletions.
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/AnalysisCriterion.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

import java.util.List;
Expand Down
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/BacktestExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

import java.util.Collections;
Expand Down
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/Bar.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

import java.io.Serializable;
Expand Down
125 changes: 59 additions & 66 deletions ta4j-core/src/main/java/org/ta4j/core/BarSeries.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,28 @@ public interface BarSeries extends Serializable {
String getName();

/**
* *
* The base currency identifier used in the series
* * The base currency identifier used in the series
*
* @return
*/
public String getBaseCurrency();

/**
* *
* the counter currency identifier used in the series
* * the counter currency identifier used in the series
*
* @return
*/
public String getCounterCurrency();

/**
* *
* The time period of the series
* * The time period of the series
*
* @return
*/
public Duration getTimePeriod();

/**
* *
* the base and counter currency identifiers return as a single string
* * the base and counter currency identifiers return as a single string
*
* @return
*/
Expand Down Expand Up @@ -125,10 +121,10 @@ default boolean isEmpty() {
/**
* Warning: should be used carefully!
*
* Returns the raw bar data. It means that it returns the current List
* object used internally to store the {@link Bar bars}. It may be: - a
* shortened bar list if a maximum bar count has been set - an extended bar
* list if it is a constrained bar series
* Returns the raw bar data. It means that it returns the current List object
* used internally to store the {@link Bar bars}. It may be: - a shortened bar
* list if a maximum bar count has been set - an extended bar list if it is a
* constrained bar series
*
* @return the raw bar data
*/
Expand All @@ -145,8 +141,8 @@ default boolean isEmpty() {
int getEndIndex();

/**
* @return the description of the series period (e.g. "from 12:00 21/01/2014
* to 12:15 21/01/2014")
* @return the description of the series period (e.g. "from 12:00 21/01/2014 to
* 12:15 21/01/2014")
*/
default String getSeriesPeriodDescription() {
StringBuilder sb = new StringBuilder();
Expand All @@ -168,10 +164,9 @@ default String getSeriesPeriodDescription() {
/**
* Sets the maximum number of bars that will be retained in the series.
*
* If a new bar is added to the series such that the number of bars will
* exceed the maximum bar count, then the FIRST bar in the series is
* automatically removed, ensuring that the maximum bar count is not
* exceeded.
* If a new bar is added to the series such that the number of bars will exceed
* the maximum bar count, then the FIRST bar in the series is automatically
* removed, ensuring that the maximum bar count is not exceeded.
*
* @param maximumBarCount the maximum bar count
*/
Expand All @@ -186,13 +181,13 @@ default String getSeriesPeriodDescription() {
* Adds a bar at the end of the series.
*
* Begin index set to 0 if it wasn't initialized.<br>
* End index set to 0 if it wasn't initialized, or incremented if it matches
* the end of the series.<br>
* End index set to 0 if it wasn't initialized, or incremented if it matches the
* end of the series.<br>
* Exceeding bars are removed.
*
* @param bar the bar to be added
* @apiNote use #addBar(Duration, ZonedDateTime, Num, Num, Num, Num, Num) to
* add bar data directly
* @apiNote use #addBar(Duration, ZonedDateTime, Num, Num, Num, Num, Num) to add
* bar data directly
* @see BarSeries#setMaximumBarCount(int)
*/
default void addBar(Bar bar) {
Expand All @@ -203,15 +198,16 @@ default void addBar(Bar bar) {
* Adds a bar at the end of the series.
*
* Begin index set to 0 if it wasn't initialized.<br>
* End index set to 0 if it wasn't initialized, or incremented if it matches
* the end of the series.<br>
* End index set to 0 if it wasn't initialized, or incremented if it matches the
* end of the series.<br>
* Exceeding bars are removed.
*
* @param bar the bar to be added
* @param bar the bar to be added
* @param replace true to replace the latest bar. Some exchange provide
* continuous new bar data in the time period. (eg. 1s in 1m Duration)<br>
* @apiNote use #addBar(Duration, ZonedDateTime, Num, Num, Num, Num, Num) to
* add bar data directly
* continuous new bar data in the time period. (eg. 1s in 1m
* Duration)<br>
* @apiNote use #addBar(Duration, ZonedDateTime, Num, Num, Num, Num, Num) to add
* bar data directly
* @see BarSeries#setMaximumBarCount(int)
*/
void addBar(Bar bar, boolean replace);
Expand All @@ -220,7 +216,7 @@ default void addBar(Bar bar) {
* Adds a bar at the end of the series.
*
* @param timePeriod the {@link Duration} of this bar
* @param endTime the {@link ZonedDateTime end time} of this bar
* @param endTime the {@link ZonedDateTime end time} of this bar
*/
void addBar(Duration timePeriod, ZonedDateTime endTime);

Expand Down Expand Up @@ -278,26 +274,26 @@ default void addBar(ZonedDateTime endTime, Num openPrice, Num highPrice, Num low
/**
* Adds a new <code>Bar</code> to the bar series.
*
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param closePrice the last/close price
* @param volume the volume (default zero)
* @param amount the amount (default zero)
* @param volume the volume (default zero)
* @param amount the amount (default zero)
*/
void addBar(ZonedDateTime endTime, Num openPrice, Num highPrice, Num lowPrice, Num closePrice, Num volume,
Num amount);

/**
* Adds a new <code>Bar</code> to the bar series.
*
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param closePrice the last/close price
* @param volume the volume (default zero)
* @param volume the volume (default zero)
*/
void addBar(Duration timePeriod, ZonedDateTime endTime, Num openPrice, Num highPrice, Num lowPrice, Num closePrice,
Num volume);
Expand All @@ -306,13 +302,13 @@ void addBar(Duration timePeriod, ZonedDateTime endTime, Num openPrice, Num highP
* Adds a new <code>Bar</code> to the bar series.
*
* @param timePeriod the time period of the bar
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param endTime end time of the bar
* @param openPrice the open price
* @param highPrice the high/max price
* @param lowPrice the low/min price
* @param closePrice the last/close price
* @param volume the volume (default zero)
* @param amount the amount (default zero)
* @param volume the volume (default zero)
* @param amount the amount (default zero)
*/
void addBar(Duration timePeriod, ZonedDateTime endTime, Num openPrice, Num highPrice, Num lowPrice, Num closePrice,
Num volume, Num amount);
Expand All @@ -321,7 +317,7 @@ void addBar(Duration timePeriod, ZonedDateTime endTime, Num openPrice, Num highP
* Adds a trade at the end of bar period.
*
* @param tradeVolume the traded volume
* @param tradePrice the price
* @param tradePrice the price
*/
default void addTrade(Number tradeVolume, Number tradePrice) {
addTrade(numOf(tradeVolume), numOf(tradePrice));
Expand All @@ -331,7 +327,7 @@ default void addTrade(Number tradeVolume, Number tradePrice) {
* Adds a trade at the end of bar period.
*
* @param tradeVolume the traded volume
* @param tradePrice the price
* @param tradePrice the price
*/
default void addTrade(String tradeVolume, String tradePrice) {
addTrade(numOf(new BigDecimal(tradeVolume)), numOf(new BigDecimal(tradePrice)));
Expand All @@ -341,13 +337,12 @@ default void addTrade(String tradeVolume, String tradePrice) {
* Adds a trade at the end of bar period.
*
* @param tradeVolume the traded volume
* @param tradePrice the price
* @param tradePrice the price
*/
void addTrade(Num tradeVolume, Num tradePrice);

/**
* *
* Adds a trade at the end of bar period.
* * Adds a trade at the end of bar period.
*
* @param trade
*/
Expand All @@ -369,28 +364,26 @@ default void addPrice(Number price) {
}

/**
* Returns a new {@link BarSeries} instance that is a subset of this
* BarSeries instance. It holds a copy of all {@link Bar bars} between
* <tt>startIndex</tt>
* (inclusive) and <tt>endIndex</tt> (exclusive) of this BarSeries. The
* indices of this BarSeries and the new subset BarSeries can be different.
* I. e. index 0 of the new BarSeries will be index <tt>startIndex</tt> of
* this BarSeries. If <tt>startIndex</tt> < this.seriesBeginIndex the new
* BarSeries will start with the first available Bar of this BarSeries. If
* <tt>endIndex</tt> > this.seriesEndIndex the new BarSeries will end at the
* last available Bar of this BarSeries
* Returns a new {@link BarSeries} instance that is a subset of this BarSeries
* instance. It holds a copy of all {@link Bar bars} between <tt>startIndex</tt>
* (inclusive) and <tt>endIndex</tt> (exclusive) of this BarSeries. The indices
* of this BarSeries and the new subset BarSeries can be different. I. e. index
* 0 of the new BarSeries will be index <tt>startIndex</tt> of this BarSeries.
* If <tt>startIndex</tt> < this.seriesBeginIndex the new BarSeries will start
* with the first available Bar of this BarSeries. If <tt>endIndex</tt> >
* this.seriesEndIndex the new BarSeries will end at the last available Bar of
* this BarSeries
*
* @param startIndex the startIndex (inclusive)
* @param endIndex the endIndex (exclusive)
* @param endIndex the endIndex (exclusive)
* @return a new BarSeries with Bars from startIndex to endIndex-1
* @throws IllegalArgumentException if endIndex <= startIndex or startIndex
* < 0
* @throws IllegalArgumentException if endIndex <= startIndex or startIndex < 0
*/
BarSeries getSubSeries(int startIndex, int endIndex);

/**
* Transforms a {@link Number} into the {@link Num implementation} used by
* this bar series
* Transforms a {@link Number} into the {@link Num implementation} used by this
* bar series
*
* @param number a {@link Number} implementing object.
* @return the corresponding value as a Num implementing object
Expand Down
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/BarSeriesBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

/**
Expand Down
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/BarSeriesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

import org.slf4j.Logger;
Expand Down
15 changes: 1 addition & 14 deletions ta4j-core/src/main/java/org/ta4j/core/BaseBarBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* This copy of Woodstox XML processor is licensed under the
* Apache (Software) License, version 2.0 ("the License").
* See the License for details about distribution rights, and the
* specific rights regarding derivate works.
*
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/
*
* A copy is also included in the downloadable source code package
* containing Woodstox, in file "ASL2.0", under the same directory
* as this file.
*/

package org.ta4j.core;

import java.time.Duration;
Expand Down
Loading

0 comments on commit 178e99e

Please sign in to comment.