All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.imap.protocol.command.QuotedImapCommand Maven / Gradle / Ivy

There is a newer version: 0.6.1
Show newest version
package com.hubspot.imap.protocol.command;

import java.util.List;
import java.util.stream.Collectors;

public class QuotedImapCommand extends BaseImapCommand {

  private static final String QUOTE = "\"";

  public QuotedImapCommand(ImapCommandType type, String... args) {
    super(type, args);
  }

  @Override
  public List getArgs() {
    return super
      .getArgs()
      .stream()
      .map(QuotedImapCommand::quote)
      .collect(Collectors.toList());
  }

  private static String quote(String in) {
    StringBuilder result = new StringBuilder();
    result.append(QUOTE);
    result.append(in);
    result.append(QUOTE);
    return result.toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy