LightJason - AgentSpeak(L++)
IPlanStatistic.java
Go to the documentation of this file.
1 /*
2  * @cond LICENSE
3  * ######################################################################################
4  * # LGPL License #
5  * # #
6  * # This file is part of the LightJason AgentSpeak(L++) #
7  * # Copyright (c) 2015-19, LightJason (info@lightjason.org) #
8  * # This program is free software: you can redistribute it and/or modify #
9  * # it under the terms of the GNU Lesser General Public License as #
10  * # published by the Free Software Foundation, either version 3 of the #
11  * # License, or (at your option) any later version. #
12  * # #
13  * # This program is distributed in the hope that it will be useful, #
14  * # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15  * # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16  * # GNU Lesser General Public License for more details. #
17  * # #
18  * # You should have received a copy of the GNU Lesser General Public License #
19  * # along with this program. If not, see http://www.gnu.org/licenses/ #
20  * ######################################################################################
21  * @endcond
22  */
23 
24 package org.lightjason.agentspeak.language.instantiable.plan.statistic;
25 
28 
29 import javax.annotation.Nonnegative;
30 import javax.annotation.Nonnull;
31 import java.util.stream.Stream;
32 
33 
37 public interface IPlanStatistic extends Comparable<IPlanStatistic>
38 {
44  @Nonnull
45  IPlan plan();
46 
52  @Nonnegative
53  long count();
54 
60  @Nonnegative
61  long successful();
62 
68  @Nonnegative
69  double successfulratio();
70 
76  @Nonnegative
77  long fail();
78 
84  @Nonnegative
85  double failratio();
86 
92  @Nonnull
94 
100  @Nonnull
102 
109  @Nonnull
110  Stream<IVariable<?>> variables();
111 
112 
113 }
double successfulratio()
returns the ratio of successful execution
IPlanStatistic incrementfail()
increments the failed executions
Stream< IVariable<?> > variables()
returns a stream with variables of the internal data
IPlanStatistic incrementsuccessful()
increments the successful executions