Example usage for java.util.function Consumer toString

List of usage examples for java.util.function Consumer toString

Introduction

In this page you can find the example usage for java.util.function Consumer toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.usrz.libs.httpd.handlers.RestHandlerProvider.java

/**
 * Create a new {@link RestHandlerProvider} instance specifying a consumer
 * configuring the {@link Application}.//from  ww  w  . j av  a2 s  .  c o m
 */
public RestHandlerProvider(Consumer<ResourceConfig> consumer, HttpHandlerPath path) {
    super(path, true);

    this.path = notNull(path, "Null path");
    config = new ResourceConfig();
    config.setApplicationName(consumer.toString());
    notNull(consumer).accept(config);
}