Package ru.org.linux.poll

Examples of ru.org.linux.poll.PollVariant


    for (PollVariant v : poll.getVariants()) {
      String label = form.getPoll().get(v.getId());

      if (!Strings.isNullOrEmpty(label)) {
        newVariants.add(new PollVariant(v.getId(), label));
      }
    }

    for (String label : form.getNewPoll()) {
      if (!Strings.isNullOrEmpty(label)) {
        newVariants.add(new PollVariant(0, label));
      }
    }

    return poll.createNew(newVariants);
  }
View Full Code Here


  private static Poll preparePollPreview(AddTopicRequest form) {
    List<PollVariant> variants = new ArrayList<>(form.getPoll().length);

    for (String item : form.getPoll()) {
      if (!Strings.isNullOrEmpty(item)) {
        variants.add(new PollVariant(0, item));
      }
    }

    return new Poll(0, 0, form.isMultiSelect(), false, variants);
  }
View Full Code Here

TOP

Related Classes of ru.org.linux.poll.PollVariant

Copyright © 2018 www.massapicom. 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.