Removed stream usage from CubicTemplate.

This commit is contained in:
MobiusDevelopment 2023-01-08 14:37:43 +00:00
parent 6e8a72c251
commit 14542eeddd
26 changed files with 364 additions and 26 deletions

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override

View File

@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder
@Override
public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target)
{
return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target));
if (_conditions.isEmpty())
{
return true;
}
for (ICubicCondition condition : _conditions)
{
if (!condition.test(cubic, owner, target))
{
return false;
}
}
return true;
}
@Override