Examples of accepts()


Examples of joptsimple.OptionParser.accepts()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_BUFFER_SIZE, "Socket buffer size")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(REQS, "Requests per session").withRequiredArg().ofType(Integer.class);
        parser.accepts(CONNECTIONS, "Total connections to make")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts("help");
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .ofType(Integer.class);
        parser.accepts(SOCKET_BUFFER_SIZE, "Socket buffer size")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(REQS, "Requests per session").withRequiredArg().ofType(Integer.class);
        parser.accepts(CONNECTIONS, "Total connections to make")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts("help");

        OptionSet options = parser.parse(args);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .ofType(Integer.class);
        parser.accepts(REQS, "Requests per session").withRequiredArg().ofType(Integer.class);
        parser.accepts(CONNECTIONS, "Total connections to make")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts("help");

        OptionSet options = parser.parse(args);
        List<String> rest = (List<String>) options.nonOptionArguments();
        if(rest.size() < 2 || options.has("help")) {
            parser.printHelpOn(System.err);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        // RW operations.
        // If you omit this argument the operation will be executed in a "batch"
        // mode which is useful for scripting
        // Otherwise you will be presented with a summary of changes and with a
        // Y/N prompt
        parser.accepts("auto", "[OPTIONAL] enable auto/batch mode");
        parser.accepts("help", "print help information");
        parser.accepts("url", "[REQUIRED] bootstrap URL")
              .withRequiredArg()
              .describedAs("bootstrap-url")
              .ofType(String.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        // If you omit this argument the operation will be executed in a "batch"
        // mode which is useful for scripting
        // Otherwise you will be presented with a summary of changes and with a
        // Y/N prompt
        parser.accepts("auto", "[OPTIONAL] enable auto/batch mode");
        parser.accepts("help", "print help information");
        parser.accepts("url", "[REQUIRED] bootstrap URL")
              .withRequiredArg()
              .describedAs("bootstrap-url")
              .ofType(String.class);
        parser.accepts("node", "node id")
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        // mode which is useful for scripting
        // Otherwise you will be presented with a summary of changes and with a
        // Y/N prompt
        parser.accepts("auto", "[OPTIONAL] enable auto/batch mode");
        parser.accepts("help", "print help information");
        parser.accepts("url", "[REQUIRED] bootstrap URL")
              .withRequiredArg()
              .describedAs("bootstrap-url")
              .ofType(String.class);
        parser.accepts("node", "node id")
              .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.accepts("help", "print help information");
        parser.accepts("url", "[REQUIRED] bootstrap URL")
              .withRequiredArg()
              .describedAs("bootstrap-url")
              .ofType(String.class);
        parser.accepts("node", "node id")
              .withRequiredArg()
              .describedAs("node-id")
              .ofType(Integer.class);
        parser.accepts("delete-partitions", "Delete partitions")
              .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .ofType(String.class);
        parser.accepts("node", "node id")
              .withRequiredArg()
              .describedAs("node-id")
              .ofType(Integer.class);
        parser.accepts("delete-partitions", "Delete partitions")
              .withRequiredArg()
              .describedAs("partition-ids")
              .withValuesSeparatedBy(',')
              .ofType(Integer.class);
        parser.accepts("restore",
View Full Code Here

Examples of org.apache.abdera.model.Collection.accepts()

        Workspace ws = svc.addWorkspace("test-ws");
        Collection coll = ws.addCollection("test-coll", ws.getTitle() + "/test-coll");
        coll.setAcceptsEntry();
        assertTrue("Collection does not accept entries.", coll.acceptsEntry());
        coll.addAccepts("application/apples");
        assertTrue("Collection does not accept apples.", coll.accepts("application/apples"));
        StringWriter sw = new StringWriter();
        svc.writeTo(sw);
        // System.out.println(sw);
        String s = sw.toString();
        assertTrue("Service document does not specify acceptance of entries.", s.contains("application/atom+xml; type=entry"));
View Full Code Here

Examples of org.apache.commons.proxy.interceptor.MethodFilter.accepts()

public class TestPatternFilter extends TestCase
{
    public void testAccepts() throws Exception
    {
        final MethodFilter filter = PatternFilter.getterSetterFilter();
        assertTrue( filter.accepts( Date.class.getMethod( "getSeconds", new Class[] {} ) ) );
        assertTrue( filter.accepts( Date.class.getMethod( "getMinutes"new Class[] {} ) ) );
        assertTrue( filter.accepts( Date.class.getMethod( "setSeconds"new Class[] { Integer.TYPE } ) ) );
        assertTrue( filter.accepts( Date.class.getMethod( "setMinutes"new Class[] { Integer.TYPE } ) ) );
        assertFalse( filter.accepts( Date.class.getMethod( "toString"new Class[] {} ) ) );
        assertFalse( filter.accepts( Date.class.getMethod( "hashCode"new Class[] {} ) ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.