Examples of List


Examples of narzedzia.List

public class App {
  public static void main (String[] args) throws IOException {
    BufferedReader we = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter wy = new PrintWriter(new OutputStreamWriter(System.out),true);
    PrintWriter bl = new PrintWriter(new OutputStreamWriter(System.out),true);
    List lista = new List(); // lista z danymi
    bl.println("hello");
    bl.print("> "); bl.flush();
    for (String instr=we.readLine(); instr!=null; instr=we.readLine())
      try {
        instr = instr.trim();
        if (instr.length()==0||instr.startsWith("//")) // linia pusta lub komentarz
          throw new NullPointerException();
        String[] token = instr.split("\\p{Blank}+");
        if (token[0].equals("insert")||token[0].equals("i")) {
          if (token.length<3 || (token.length>3 && !token[3].startsWith("//")) )
            throw new IllegalArgumentException();
          int value=Integer.parseInt(token[2]);
          int pos=Integer.parseInt(token[1]);
          lista.Insert(pos,value);
          wy.format("wstawienie: lista[%s] <- %s\n",pos,value);
        }
        else if (token[0].equals("delete")||token[0].equals("d")) {
          if (token.length<2 || (token.length>2 && !token[2].startsWith("//")) )
            throw new IllegalArgumentException();
          int pos=Integer.parseInt(token[1]);
          lista.Delete(pos);
          wy.format("usunięcie: lista[%s]\n",pos);
        }
        else if (token[0].equals("read")||token[0].equals("r")) {
          if (token.length<2 || (token.length>2 && !token[2].startsWith("//")) )
            throw new IllegalArgumentException();
          int pos=Integer.parseInt(token[1]);
          wy.format("element: lista[%s] = %s\n",pos,lista.Read(pos));
        }
        else if (token[0].equals("length")||token[0].equals("l")) {
          if (token.length<1 || (token.length>1 && !token[1].startsWith("//")) )
            throw new IllegalArgumentException();
          wy.format("ilość elementów: %s\n",lista.Length());
        }
        else if (token[0].equals("print")||token[0].equals("p")) {
          if (token.length<1 || (token.length>1 && !token[1].startsWith("//")) )
            throw new IllegalArgumentException();
          wy.format("lista: %s\n",lista.toString());
        }
        else
          throw new NoSuchMethodException(token[0]);
      }
      catch (NoSuchMethodException ex)
View Full Code Here

Examples of net.caprazzi.keez.Keez.List

      this.entries = Arrays.asList(entries);
    }
   
    @Override
    public Object answer(InvocationOnMock invocation) throws Throwable {
      List cb = (List) invocation.getArguments()[0];
      cb.entries(entries);
      return null;
    }
View Full Code Here

Examples of net.caprazzi.minima.model.List

   
    db.get("keylisttodo", new GetTestHelp() {
      @Override
      public void found(String key, int rev, byte[] data) {
        assertEquals(1, rev);
        List list = List.fromJson(data);
        assertEquals("list", list.getTypeName());
        assertEquals("todo", list.getName());
        assertEquals(65536, list.getPos());
        assertEquals("keylisttodo", list.getId());
      }
    });
   
    db.get("keylistdoing", new GetTestHelp() {
      @Override
      public void found(String key, int rev, byte[] data) {
        assertEquals(1, rev);
        List list = List.fromJson(data);
        assertEquals("list", list.getTypeName());
        assertEquals("doing", list.getName());
        assertEquals(65536 * 2, list.getPos());
        assertEquals("keylistdoing", list.getId());
      }
    });
   
    db.get("keylistdone", new GetTestHelp() {
      @Override
      public void found(String key, int rev, byte[] data) {
        assertEquals(1, rev);
        List list = List.fromJson(data);
        assertEquals("list", list.getTypeName());
        assertEquals("done", list.getName());
        assertEquals(65536*3, list.getPos());
        assertEquals("keylistdone", list.getId());
      }
    });
   
    db.get("minimaster", new GetTestHelp() {
      @Override
View Full Code Here

Examples of org.apache.qpid.tools.messagestore.commands.List

        //todo Dynamically load the classes that exis in com.redhat.etp.qpid.commands
        _commands.put("close", new Clear(this));
        _commands.put("copy", new Copy(this));
        _commands.put("dump", new Dump(this));
        _commands.put("help", new Help(this));
        _commands.put("list", new List(this));
        _commands.put("load", new Load(this));
        _commands.put("move", new Move(this));
        _commands.put("purge", new Purge(this));
        _commands.put("quit", new Quit(this));
        _commands.put("select", new Select(this));
View Full Code Here

Examples of org.beryl.gui.widgets.List

  private MapDataModel dataModel = null;

  public DnDTest() throws GUIException {
    dataModel = new MapDataModel();
    frame = constructFrame("DnDTest", dataModel);
    List list1 = (List) frame.getWidget("List1");
    List list2 = (List) frame.getWidget("List2");

    ListDataModel strings = new ListDataModel();
    for (int i = 1; i <= 10; i++)
      strings.addValue("Item " + i);

    list1.setListDataModel(strings);
    list2.setListDataModel(new ListDataModel());

    dataModel.setValue("list1.value", new Object[] {
    });

    frame.show();
View Full Code Here

Examples of org.dspace.app.xmlui.wing.element.List

       
        // Use these fields to change the number of search fields, or change the results per page.
        query.addHidden("num_search_field").setValue(numSearchField);
        query.addHidden("results_per_page").setValue(getParameterRpp());
       
        List queryList = query.addList("search-query",List.TYPE_FORM);
       
        if (variableScope())
        {
            Select scope = queryList.addItem().addSelect("scope");
            scope.setLabel(T_search_scope);
            scope.setHelp(T_search_scope_help);
            buildScopeList(scope);
        }
       
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.schema.model.List

                if (prefix != null) {
                    baseTypeName = prefix + COLON + baseTypeName;
                }
                if (valueField.isXmlList() || (valueField.getGenericType() != null)) {
                    //generate a list instead of a restriction
                    List list = new List();
                    list.setItemType(baseTypeName);
                    type.setList(list);
                } else {
                    if (helper.isAnnotationPresent(valueField.getElement(), XmlSchemaType.class)) {
                        XmlSchemaType schemaType = (XmlSchemaType) helper.getAnnotation(valueField.getElement(), XmlSchemaType.class);
                        baseType = new QName(schemaType.namespace(), schemaType.name());
View Full Code Here

Examples of org.eclipse.swt.widgets.List

       
        GridData fillBoth = new GridData(GridData.FILL_BOTH);
        fillBoth.minimumHeight = 100;
        fillBoth.verticalSpan = 2;
        fillBoth.horizontalSpan = 2;
        _lstLibraries = new List(sectionClient, SWT.BORDER|SWT.MULTI);
        _lstLibraries.setLayoutData(fillBoth);
        _lstLibraries.setItems(_model.getLibraryNames());
       
        _btnAddLibrary = toolkit.createButton(sectionClient, "add...", SWT.PUSH);
        _btnAddLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
View Full Code Here

Examples of org.exolab.castor.util.List

    **/
    private void initialize() {
        _config          = LocalConfiguration.getInstance();
        _debug           = enableDebug;
        _namespaces      = new Namespaces();
        _packages        = new List(3);
        _cdResolver      = new ClassDescriptorResolverImpl();
        _parents         = new Stack();
        _validate        = _config.marshallingValidation();
        _naming          = XMLNaming.getInstance();
        _processingInstructions = new List(3);
        _attributes      = new AttributesImpl();
        _topLevelAtts    = new AttributeSetImpl();
       
        //-- saveMapKeys
        String val = _config.getProperty(Configuration.Property.SaveMapKeys, "true");
View Full Code Here

Examples of org.fao.geonet.services.region.List

  //--------------------------------------------------------------------------

  public Element exec(Element params, ServiceContext context) throws Exception
  {
      if(regions == null){
          regions = new List().exec(params, context);
          @SuppressWarnings("unchecked")
            java.util.List<Element> children = regions.getChildren(Region.REGION_EL);
          for (Element element : children) {
                element.setName("record");
                element.addContent(new Element("id").setText(element.getAttributeValue("id")));
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.