<commit_before>package me.prettyprint.cassandra.model;

import static me.prettyprint.cassandra.utils.Assert.notNull;

import org.apache.cassandra.thrift.Column;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * Hector Column definition.
 *
 * @param <N> The type of the column name
 * @param <V> The type of the column value
 *
 * @author <NAME> (<EMAIL>)
 *
 */
public final class HColumn<N,V> {

  private N name;
  private V value;
  private long timestamp;
  private final Serializer<N> nameSerializer;
  private final Serializer<V> valueSerializer;

  public HColumn(N name, V value, long timestamp, Serializer<N> nameSerializer,
      Serializer<V> valueSerializer) {
    this(nameSerializer, valueSerializer);
    notNull(name, "name is null");
    notNull(value, "value is null");

    this.name = name;
    this.value = value;
    this.timestamp = timestamp;
  }

  /*package*/ HColumn(Column thriftColumn, Serializer<N> nameSerializer,
      Serializer<V> valueSerializer) {
    this(nameSerializer, valueSerializer);
    notNull(thriftColumn, "thriftColumn is null");
    name = nameSerializer.fromBytes(thriftColumn.getName());
    value = valueSerializer.fromBytes(thriftColumn.getValue());
  }

  /*package*/ HColumn(Serializer<N> nameSerializer, Serializer<V> valueSerializer) {
    notNull(nameSerializer, "nameSerializer is null");
    notNull(valueSerializer, "valueSerializer is null");
    this.nameSerializer = nameSerializer;
    this.valueSerializer = valueSerializer;
  }

  public HColumn<N,V> setName(N name) {
    notNull(name, "name is null");
    this.name = name;
    return this;
  }

  public HColumn<N,V> setValue(V value) {
    notNull(value, "value is null");
    this.value = value;
    return this;
  }

  HColumn<N,V> setTimestamp(long timestamp) {<commit_msg>updated HColumn w timestamp set from issue 59<commit_after>package me.prettyprint.cassandra.model;

import static me.prettyprint.cassandra.utils.Assert.notNull;

import org.apache.cassandra.thrift.Column;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * Hector Column definition.
 *
 * @param <N> The type of the column name
 * @param <V> The type of the column value
 *
 * @author <NAME> (<EMAIL>)
 *
 */
public final class HColumn<N,V> {

  private N name;
  private V value;
  private long timestamp;
  private final Serializer<N> nameSerializer;
  private final Serializer<V> valueSerializer;

  public HColumn(N name, V value, long timestamp, Serializer<N> nameSerializer,
      Serializer<V> valueSerializer) {
    this(nameSerializer, valueSerializer);
    notNull(name, "name is null");
    notNull(value, "value is null");

    this.name = name;
    this.value = value;
    this.timestamp = timestamp;
  }

  /*package*/ HColumn(Column thriftColumn, Serializer<N> nameSerializer,
      Serializer<V> valueSerializer) {
    this(nameSerializer, valueSerializer);
    notNull(thriftColumn, "thriftColumn is null");
    name = nameSerializer.fromBytes(thriftColumn.getName());
    value = valueSerializer.fromBytes(thriftColumn.getValue());
    timestamp = thriftColumn.timestamp;
  }

  /*package*/ HColumn(Serializer<N> nameSerializer, Serializer<V> valueSerializer) {
    notNull(nameSerializer, "nameSerializer is null");
    notNull(valueSerializer, "valueSerializer is null");
    this.nameSerializer = nameSerializer;
    this.valueSerializer = valueSerializer;
  }

  public HColumn<N,V> setName(N name) {
    notNull(name, "name is null");
    this.name = name;
    return this;
  }

  public HColumn<N,V> setValue(V value) {
    notNull(value, "value is null");
    this.value = value;
    return this;
  }

  HColumn<N,V> setTimestamp(long timestamp) {
{'fraction_non_alphanumeric': 0.11487907465825446, 'fraction_numerical': 0.0005257623554153522, 'mean_word_length': 4.255524861878453, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4937125', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1144, 'n_words': 293}