Removed stream usage from AbstractResidence.
This commit is contained in:
parent
eb3f77bfcb
commit
b9ab99c655
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -253,7 +253,15 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public boolean hasFunction(ResidenceFunctionType type)
|
||||
{
|
||||
return _functions.values().stream().map(ResidenceFunction::getTemplate).anyMatch(func -> func.getType() == type);
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
final ResidenceFunctionTemplate template = function.getTemplate();
|
||||
if ((template != null) && (template.getType() == type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +270,11 @@ public abstract class AbstractResidence extends ListenersContainer implements IN
|
||||
*/
|
||||
public ResidenceFunction getFunction(ResidenceFunctionType type)
|
||||
{
|
||||
for (ResidenceFunction func : _functions.values())
|
||||
for (ResidenceFunction function : _functions.values())
|
||||
{
|
||||
if (func.getType() == type)
|
||||
if (function.getType() == type)
|
||||
{
|
||||
return func;
|
||||
return function;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user