Examples of Enumeration


Examples of de.zalando.typemapper.namedresult.results.Enumeration

            Assert.assertNotNull(result.getEnumList());
            Assert.assertTrue(result.getEnumList().size() == 2);
            Assert.assertNotNull(result.getEnumList().get(0));
            Assert.assertNotNull(result.getEnumList().get(1));

            final Enumeration enum1 = result.getEnumList().get(0);
            Assert.assertEquals(Enumeration.VALUE_1, enum1);

            final Enumeration enum2 = result.getEnumList().get(1);
            Assert.assertEquals(Enumeration.VALUE_2, enum2);
            Assert.assertEquals("str", result.getStr());
        }
    }
View Full Code Here

Examples of easysm.stores.Enumeration

  {
    Set<LiteralInfo> literals = SetFactory.createSet(LiteralInfo.class);
    literals.add(new LiteralInfo(stPino));
    literals.add(new LiteralInfo(stGino));
    EnumerationInfo eInfo = new EnumerationInfo(stTino, literals);
    Enumeration e = new Enumeration(eInfo);
    main.doAddStateObserver(new StateObserverInfo(stGino, Type.enumAsType(e), null));
    List<StateObserver> usedSet = main.stateObservers().soList();
    main.doSelectUsedSO(usedSet);
    main.doGenerateStateTable();
View Full Code Here

Examples of eu.admire.dispel.classifiers.Enumeration

        if (result == null) result = caseCommentable(interface_);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case ClassifiersPackage.ENUMERATION: {
        Enumeration enumeration = (Enumeration)theEObject;
        T result = caseEnumeration(enumeration);
        if (result == null) result = caseConcreteClassifier(enumeration);
        if (result == null) result = caseImplementor(enumeration);
        if (result == null) result = caseClassifier(enumeration);
        if (result == null) result = caseMemberContainer(enumeration);
View Full Code Here

Examples of java.util.Enumeration

   */
  protected void denyRequest(AgentId from, DenyRequest not) {
    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG, "Queue.DenyRequest(" + from + ',' + not + ')');

    Enumeration ids = not.getIds();

    String msgId;
    Message message;
    AgentId consId;
    int consCtx;
    DMQManager dmqManager = null;

    if (! ids.hasMoreElements()) {
      // If the deny request is empty, the denying is a contextual one: it
      // requests the denying of all the messages consumed by the denier in
      // the denying context:
      for (Iterator entries = deliveredMsgs.entrySet().iterator(); entries.hasNext();) {
        // Browsing the delivered messages:
        Map.Entry entry = (Map.Entry) entries.next();

        msgId = (String) entry.getKey();
        message = (Message) entry.getValue();

        consId = (AgentId) consumers.get(msgId);
        consCtx = ((Integer) contexts.get(msgId)).intValue();

        if (logger.isLoggable(BasicLevel.DEBUG))
          logger.log(BasicLevel.DEBUG, " -> deny msg " + msgId + "(consId = " + consId + ')');

        // If the current message has been consumed by the denier in the same
        // context: denying it.
        if (consId.equals(from) && consCtx == not.getClientContext()) {
          // state change, so save.
          setSave();
          consumers.remove(msgId);
          contexts.remove(msgId);
          entries.remove();
          message.setRedelivered();

          // If message considered as undeliverable, adding
          // it to the list of dead messages:
          if (isUndeliverable(message)) {
            message.delete();
            if (dmqManager == null)
              dmqManager = new DMQManager(dmqId, getId());
            nbMsgsSentToDMQSinceCreation++;
            dmqManager.addDeadMessage(message.getFullMessage(), MessageErrorConstants.UNDELIVERABLE);
          } else {
            // Else, putting the message back into the deliverables list:
            storeMessageHeader(message);
          }

          if (logger.isLoggable(BasicLevel.DEBUG))
            logger.log(BasicLevel.DEBUG, "Message " + msgId + " denied.");
        }
      }
    }

    // For a non empty request, browsing the denied messages:
    for (ids = not.getIds(); ids.hasMoreElements();) {
      msgId = (String) ids.nextElement();
      message = (Message) deliveredMsgs.remove(msgId);

      // Message may have already been denied. For example, a proxy may deny
      // a message twice, first when detecting a connection failure - and
      // in that case it sends a contextual denying -, then when receiving
View Full Code Here

Examples of java.util.Enumeration

        }
        writer.writeEndElement();
    }

    private void addNamespaceDeclarations(Properties namespaces) throws XMLStreamException{
        Enumeration e = namespaces.propertyNames();
        while (e.hasMoreElements()){
            String prefix = (String)e.nextElement();
            String uri = namespaces.getProperty(prefix);
            writer.writeStartElement(MappingNodeConstants.Tags.NAMESPACE_DECLARATION);
            if (!prefix.equals(MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX)){
              writeElement(MappingNodeConstants.Tags.NAMESPACE_DECLARATION_PREFIX, prefix);
            }
View Full Code Here

Examples of java.util.Enumeration

  protected static ResourceXmlBean getResource(String id) {
    return (ResourceXmlBean) roots.get(id);
  }

  protected static Vector getItems() {
    Enumeration elts = roots.elements();
    Vector retour = new Vector();
    while (elts.hasMoreElements()) {
      retour.add(elts.nextElement());
    }
    return retour;
  }
View Full Code Here

Examples of java.util.Enumeration

    }
   
    public int hashCode() {
        int code = Integer.MAX_VALUE/45; // "random" value for empty lists
        String paramName = null;
        Enumeration enm = this.getNames();

        while (enm.hasMoreElements()) {
            paramName = (String)enm.nextElement();
            code += paramName.hashCode();
            code += this.get(paramName).hashCode();
        }

        return code;
View Full Code Here

Examples of java.util.Enumeration

    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.ensureCapacity(parameters.size() * 16);    //    heuristic: 8 characters per field
       
        Enumeration keys = parameters.keys();
        while(keys.hasMoreElements())
        {
            buffer.append("; ");
           
            String key = (String)keys.nextElement();
            buffer.append(key);
            buffer.append('=');
               buffer.append(quote((String)parameters.get(key)));
        }
       
View Full Code Here

Examples of java.util.Enumeration

  protected static ResourceXmlBean getResource(String id) {
    return (ResourceXmlBean) roots.get(id);
  }

  protected static Vector getItems() {
    Enumeration elts = roots.elements();
    Vector retour = new Vector();
    while (elts.hasMoreElements()) {
      retour.add(elts.nextElement());
    }
    return retour;
  }
View Full Code Here

Examples of java.util.Enumeration

  static void extract(final File sourceZipFile, File unzipDestinationDirectory) throws IOException {
    // Open Zip file for reading
    ZipFile zipFile = new ZipFile(sourceZipFile, ZipFile.OPEN_READ);

    // Create an enumeration of the entries in the zip file
    Enumeration zipFileEntries = zipFile.entries();

    // Process each entry
    while (zipFileEntries.hasMoreElements()) {
      // grab a zip file entry
      ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();

      String currentEntry = entry.getName();

      File destFile = new File(unzipDestinationDirectory, currentEntry);
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.