<commit_before>/* *************************************************************************************************
 HeaderField.swift
   © 2018 YOCKOW.
     Licensed under MIT License.
     See "LICENSE.txt" for more information.
 ************************************************************************************************ */
 

/// # HeaderField
/// Represents each HTTP Header Field.
public struct HeaderField {
  public enum PresenceType {
    /// There are no other fields of the same name in the same header.
    /// e.g.) "ETag"
    case single
    
    /// There may be other fields of the same name in the same header.
    /// e.g.) "Set-Cookie"
    case duplicable
    
    /// The value of the field can be appended.
    /// e.g.) "Cache-Control"
    case appendable
  }
}<commit_msg>[HTTP] Make `HeaderField` available to be initialized with delegate.<commit_after>/* *************************************************************************************************
 HeaderField.swift
   © 2018 YOCKOW.
     Licensed under MIT License.
     See "LICENSE.txt" for more information.
 ************************************************************************************************ */
 

/// # HeaderField
/// Represents each HTTP Header Field.
public struct HeaderField {
  public enum PresenceType {
    /// There are no other fields of the same name in the same header.
    /// e.g.) "ETag"
    case single
    
    /// There may be other fields of the same name in the same header.
    /// e.g.) "Set-Cookie"
    case duplicable
    
    /// The value of the field can be appended.
    /// e.g.) "Cache-Control"
    case appendable
  }
  
  internal var _delegate: HeaderFieldDelegate
  
  public var name:HeaderFieldName {
    return self._delegate.name
  }
  
  public var value:HeaderFieldValue {
    return self._delegate.value
  }
  
  /// Returns the Boolean value that indicates whether the field is duplicable or not.
  /// e.g.) "Set-Cookie" field is duplicable.
  public var isDuplicable:Bool {
    return self._delegate.type == .duplicable
  }
  
  /// Returns the Boolean value that indicates whether the field is appendable or not.
  /// e.g.) "Cache-Control" field is appendable.
  public var isAppendable:Bool {
    return self._delegate.type == .appendable
  }
  
  /// Creates an instance with `delegate`
  public init(delegate:HeaderFieldDelegate) {
    self._delegate = delegate
  }
}
{'fraction_non_alphanumeric': 0.24287484510532836, 'fraction_numerical': 0.003304419661296985, 'mean_word_length': 3.0299500831946755, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2221684', 'n_tokens_mistral': 636, 'n_tokens_neox': 597, 'n_words': 223}