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

com.hubspot.imap.utils.enums.EnvelopeField Maven / Gradle / Ivy

There is a newer version: 0.6.1
Show newest version
package com.hubspot.imap.utils.enums;

import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

public enum EnvelopeField {
  DATE("date"),
  SUBJECT("subject"),
  FROM("from"),
  SENDER("sender"),
  REPLY_TO("reply-to"),
  TO("to"),
  CC("cc"),
  BCC("bcc"),
  IN_REPLY_TO("in-reply-to"),
  MESSAGE_ID("message-id");

  private final String fieldName;
  public static final Map NAME_INDEX = Arrays
    .stream(EnvelopeField.values())
    .collect(Collectors.toMap(EnvelopeField::getFieldName, Function.identity()));

  EnvelopeField(String fieldName) {
    this.fieldName = fieldName;
  }

  public String getFieldName() {
    return fieldName;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy