<commit_before>/*
 * Copyright 2009-2014 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *           http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.atatec.trugger.element.impl;

import org.atatec.trugger.HandlingException;
import org.atatec.trugger.ValueHandler;
import org.atatec.trugger.element.Element;

import java.lang.annotation.Annotation;

/**
 * Base class for all decorated elements.
 *
 * @author <NAME>
 */
public class DecoratedElement implements Element {

  protected final Element element;

  public DecoratedElement(Element decorated) {
    this.element = decorated;
  }

  public Class declaringClass() {
    return element.declaringClass();
  }

  public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
    return element.getAnnotation(annotationClass);
  }

  public Annotation[] getAnnotations() {
    return element.getAnnotations();
  }

  public Annotation[] getDeclaredAnnotations() {
    return element.getDeclaredAnnotations();
  }

  public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
    return element.isAnnotationPresent(annotationClass);
  }

  public boolean isSpecific() {
    return element.isSpecific();
  }

  public <E> E target() {
    return element.target();
  }

  public String name() {
    return element.name();
  }

  public Class type() {
    return element.type();
  }

  @Override
  public void set(Object value) throws HandlingException {
    in(target()).set(value);
  }

  @Override
  public <E> E get() throws HandlingException {
    return in(target()).get();
  }

  @Override
  public ValueHandler in(Object target) {
    return element.in(target);
  }

  public boolean isReadable() {
    return element.isReadable();
  }

  public boolean isWritable() {
    return element.isWritable();
  }

  @Override
  public boolean equals(Object obj) {
    return element.equals(obj);
  }

  @Override
  public int hashCode() {
    return element.hashCode();
  }

  @Override
  public String toString() {
    return element.toString();
  }

}<commit_msg>unnecessary hashcode and equals<commit_after>/*
 * Copyright 2009-2014 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *           http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.atatec.trugger.element.impl;

import org.atatec.trugger.HandlingException;
import org.atatec.trugger.ValueHandler;
import org.atatec.trugger.element.Element;

import java.lang.annotation.Annotation;

/**
 * Base class for all decorated elements.
 *
 * @author <NAME>
 */
public class DecoratedElement implements Element {

  protected final Element element;

  public DecoratedElement(Element decorated) {
    this.element = decorated;
  }

  public Class declaringClass() {
    return element.declaringClass();
  }

  public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
    return element.getAnnotation(annotationClass);
  }

  public Annotation[] getAnnotations() {
    return element.getAnnotations();
  }

  public Annotation[] getDeclaredAnnotations() {
    return element.getDeclaredAnnotations();
  }

  public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
    return element.isAnnotationPresent(annotationClass);
  }

  public boolean isSpecific() {
    return element.isSpecific();
  }

  public <E> E target() {
    return element.target();
  }

  public String name() {
    return element.name();
  }

  public Class type() {
    return element.type();
  }

  @Override
  public void set(Object value) throws HandlingException {
    in(target()).set(value);
  }

  @Override
  public <E> E get() throws HandlingException {
    return in(target()).get();
  }

  @Override
  public ValueHandler in(Object target) {
    return element.in(target);
  }

  public boolean isReadable() {
    return element.isReadable();
  }

  public boolean isWritable() {
    return element.isWritable();
  }

  @Override
  public String toString() {
    return element.toString();
  }

}
{'fraction_non_alphanumeric': 0.10075157424334755, 'fraction_numerical': 0.004875076173065204, 'mean_word_length': 3.7119617224880384, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1219239', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1367, 'n_words': 430}