本文整理了Java中org.boon.Boon.putl()
方法的一些代码示例,展示了Boon.putl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Boon.putl()
方法的具体详情如下:
包路径:org.boon.Boon
类名称:Boon
方法名:putl
[英]Like puts but prints out each object on its own line. If the object is a list or array, then each item in the list gets printed out on its own line.
[中]类似于puts,但在各自的行上打印每个对象。如果对象是一个列表或数组,那么列表中的每个项目都会打印在自己的行上。
代码示例来源:origin: boonproject/boon
protected void inspectMap ( Map<String, Object> map ) {
final Set<Map.Entry<String, Object>> entrySet = map.entrySet ();
putl ( "map", map, "size", map.size (), "keys", map.keySet (), "values", map.values () );
for ( String key : map.keySet () ) {
puts ( "key", "#" + key + "#" );
}
for ( Object value : map.values () ) {
puts ( "value", "#" + value + "#" );
}
}
代码示例来源:origin: boonproject/boon
protected void inspectMap ( Map<String, Object> map ) {
final Set<Map.Entry<String, Object>> entrySet = map.entrySet ();
putl ( "map", map, "size", map.size (), "keys", map.keySet (), "values", map.values () );
for ( String key : map.keySet () ) {
puts ( "key", "#" + key + "#" );
}
for ( Object value : map.values () ) {
puts ( "value", "#" + value + "#" );
}
}
代码示例来源:origin: boonproject/boon
putl ( "Max employee by natural order",
max(employees) );
putl ( "Greatest top 5 employee by natural order",
greatest(employees, 5) );
putl ( "Min employee by natural order",
min(employees) );
putl ( "Least top 5 employee by natural order",
least(employees, 5) );
putl ( "Who makes the most?",
max(employees, "salary") );
putl ( "Who are the top five earners?",
greatest(employees, "salary", 5) );
putl ( "Who makes the least?",
min(employees, "salary") );
putl ( "Who are the lowest paid?",
least(employees, "salary", 5) );
putl( "Sorted employees by lastName", employees);
putl( "Sorted department in natural order", departmentList);
putl("Sort employees by department name, descending lastName and" +
代码示例来源:origin: boonproject/boon
private void monitor() {
if (recoverMode.get()) {
check("outputDir", this.writer.outputDir());
}
//monitor runtime state... TBD
//Health check of system.
putl("Monitor:",
sputs(" total bytes transferred: ", String.format("%,d", this.writer.totalBytesTransferred())),
sputs(" avg buffer size : ", String.format("%,d", this.writer.averageBufferSize())),
sputs(" numberOfFlushesTotal: ", this.numberOfFlushesTotal.get()),
sputs(" input inputChannel size: ", this.inputChannel.size()),
sputs(" recycle inputChannel size: ", this.recycleChannel.size()),
sputs(" bytes transferred for log: ", String.format("%,d", this.writer.bytesTransferred())),
sputs(" current log ", this.writer.fileName())
);
monitorCount++;
if (monitorCount % 5 == 0) {
String outputDir = this.writer.outputDir();
check("output directory", outputDir);
}
}
代码示例来源:origin: io.fastjson/qbit
private void doCall(MethodCall<Object> methodCall) {
if (GlobalConstants.DEBUG) {
logger.info(Boon.className(this), "::doCall()",
methodCall.name(),
methodCall.address(),
"\n", methodCall);
}
boolean [] continueFlag = new boolean[1];
methodCall = beforeMethodCall(methodCall, continueFlag);
if (!continueFlag[0]) {
logger.info(Boon.className(this), "::doCall()",
"Flag from before call handling does not want to continue");
}
SendQueue<MethodCall<Object>> sendQueue = null;
if ( !Str.isEmpty(methodCall.address()) ) {
sendQueue = handleByAddressCall(methodCall);
} else if ( !Str.isEmpty(methodCall.objectName()) ) {
sendQueue = serviceMapping.get(methodCall.objectName());
}
if (GlobalConstants.DEBUG && sendQueue==null) {
putl(serviceMapping.keySet());
die("SEND QUEUE IS NULL FOR METHOD", methodCall,
"\n", serviceMapping.keySet());
return;
}
sendQueue.send(methodCall);
}
代码示例来源:origin: boonproject/boon
putl("get the employees from the second department",
atIndex(departments, "[1].employees"));
putl("get all employees in all departmentsList",
atIndex(departments, "this.employees"));
putl("get the all of the phone numbers of all of the employees",
BeanUtils.idxList(departments, "employees.contactInfo.phoneNumbers"));
代码示例来源:origin: boonproject/boon
putl("get the employees from the second department",
atIndex(departments, "[1].employees"));
putl("get all employees in all departmentsList",
atIndex(departments, "this.employees"));
putl("get the all of the phone numbers of all of the employees",
BeanUtils.idxList(departments, "employees.contactInfo.phoneNumbers"));
代码示例来源:origin: boonproject/boon
private static void runComponentClassTestForIssue() {
putl( "EXAMPLE: Simple Composite Object query example",
"See com.examples.model.test",
"See Email and UserEmail classes",
putl( "The primary key is set to email" );
putl( "For ease of use you can setup nested properties ",
"UserEmail.email property is a Email object not a string",
"Email.email is a string." );
putl( "Query using nested query Repo.eqNestedAdvanced()" );
UserEmail bob = ( UserEmail ) userRepo.results(
eq( "email.email", "bob@bob.com" ) )
putl( "Avoid the cast with using nested query Repo.eqNestedAdvanced(UserEmail.class)" );
putl( "__________________________________________",
"__________________________________________",
"__________________________________________" );
代码示例来源:origin: boonproject/boon
public static void main(String... args) {
puts(multiply('_', 30), "From JAVA Objects", multiply('_', 30), "\n");
List<Employee> employees = (List<Employee>) BeanUtils.idxList(departmentsList, "employees");
sorting(employees, departmentsList);
puts(multiply('_', 30), "From LIST MAPS", multiply('_', 30), "\n");
List<?> employeeObjects = (List<?>) BeanUtils.idxList(departmentObjects, "employees");
sorting(employeeObjects, departmentObjects);
puts(multiply('_', 30), "From JSON", multiply('_', 30), "\n");
String json = toJson(departmentObjects);
puts(json);
Object jsonObject = fromJson(json);
List<?> jsonDepartments = (List<?>) jsonObject;
List<?> jsonEmployees = (List<Employee>) BeanUtils.idxList(jsonDepartments, "employees");
sorting(jsonEmployees, jsonDepartments);
//Using Search
sort(employees);
Employee employee = employees.get(5);
Employee employee2 = search(employees, employee);
int index = searchForIndex(employees, employee);
putl("This employee was found at ", index, employee2, employee, '\n', employees);
//Using a Set instead of a list
Set<Employee> employeesSet = new LinkedHashSet<>(employees);
employeesSet = (Set<Employee>) sort(Employee.class, employeesSet, "id");
putl("Sort Employee SET by id", employeesSet);
Employee[] employeesArray = toArray(Employee.class, employees);
sort(employeesArray, "firstName");
putl("Sort Employee ARRAY by firstName", employeesArray);
}
代码示例来源:origin: boonproject/boon
userRepo.query( eq( EMAIL, "rick.hightower@foo.com" ) );
putl( "SliceNotationExample 1: Simple Query using Equals Results", results );
userRepo.query( notEq( EMAIL, "rick.hightower@foo.com" ) );
putl( "SliceNotationExample 2: Simple Query using Not Equals Results", results );
putl( notRick );
putl( "SliceNotationExample 3: Simple query using ResultSet.firstItem", rick );
putl( "SliceNotationExample 4: Simple query using ResultSet.expectOne().firstItem", rick );
putl( "SliceNotationExample 5: Simple query using ResultSet.expectOne(user).firstItem", rick );
putl( "SliceNotationExample 6: Failure case, we have more than one for",
"query using ResultSet.expectOne(user).firstItem" );
内容来源于网络,如有侵权,请联系作者删除!