本文整理汇总了Java中gnu.trove.TObjectProcedure.execute方法的典型用法代码示例。如果您正苦于以下问题:Java TObjectProcedure.execute方法的具体用法?Java TObjectProcedure.execute怎么用?Java TObjectProcedure.execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gnu.trove.TObjectProcedure
的用法示例。
在下文中一共展示了TObjectProcedure.execute方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: any
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
/**
* Returns true if the procedure proc returns true for any
* element of the array v.
*/
public static boolean any (TObjectProcedure proc, Object[][] v)
{
for (int i = 0; i < v.length; i++) {
for (int j = 0; j < v[i].length; j++) {
if (proc.execute (v[i][j])) {
return true;
}
}
}
return false;
}
示例2: forEach
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
public static void forEach (TObjectProcedure proc, Object[][] v)
{
for (int i = 0; i < v.length; i++) {
for (int j = 0; j < v[i].length; j++) {
proc.execute (v[i][j]);
}
}
}
示例3: forEach
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
@Override
public boolean forEach(@NotNull TObjectProcedure<T> procedure) {
T theElement = this.theElement;
if (theElement != null) {
return procedure.execute(theElement);
}
return super.forEach(procedure);
}
示例4: forEach
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
@Override
public boolean forEach(@Nonnull TObjectProcedure<T> procedure) {
T theElement = this.theElement;
if (theElement != null) {
return procedure.execute(theElement);
}
return super.forEach(procedure);
}
示例5: any
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
/**
* Returns true if the procedure proc returns true for any element of the
* array v.
*/
public static boolean any(TObjectProcedure proc, Object[][] v) {
for (int i = 0; i < v.length; i++) {
for (int j = 0; j < v[i].length; j++) {
if (proc.execute(v[i][j])) {
return true;
}
}
}
return false;
}
示例6: forEach
import gnu.trove.TObjectProcedure; //导入方法依赖的package包/类
public static void forEach(TObjectProcedure proc, Object[][] v) {
for (int i = 0; i < v.length; i++) {
for (int j = 0; j < v[i].length; j++) {
proc.execute(v[i][j]);
}
}
}