congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AttributeImpl.clone
Code IndexAdd Tabnine to your IDE (free)

How to use
clone
method
in
org.apache.lucene.util.AttributeImpl

Best Java code snippets using org.apache.lucene.util.AttributeImpl.clone (Showing top 20 results out of 315)

origin: org.apache.lucene/lucene-core

@Override
public PayloadAttributeImpl clone()  {
 PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
 if (payload != null) {
  clone.payload = BytesRef.deepCopyOf(payload);
 }
 return clone;
}
origin: org.apache.lucene/lucene-core

@Override
public AttributeImpl clone() {
 BytesTermAttributeImpl c = (BytesTermAttributeImpl)super.clone();
 copyTo(c);
 return c;
}
origin: org.apache.lucene/lucene-core

 @Override
 public State clone() {
  State clone = new State();
  clone.attribute = attribute.clone();
  
  if (next != null) {
   clone.next = next.clone();
  }
  
  return clone;
 }
}
origin: org.apache.lucene/lucene-core

/**
 * Performs a clone of all {@link AttributeImpl} instances returned in a new
 * {@code AttributeSource} instance. This method can be used to e.g. create another TokenStream
 * with exactly the same attributes (using {@link #AttributeSource(AttributeSource)}).
 * You can also use it as a (non-performant) replacement for {@link #captureState}, if you need to look
 * into / modify the captured state.
 */
public final AttributeSource cloneAttributes() {
 final AttributeSource clone = new AttributeSource(this.factory);
 
 if (hasAttributes()) {
  // first clone the impls
  for (State state = getCurrentState(); state != null; state = state.next) {
   clone.attributeImpls.put(state.attribute.getClass(), state.attribute.clone());
  }
  
  // now the interfaces
  for (Entry<Class<? extends Attribute>, AttributeImpl> entry : this.attributes.entrySet()) {
   clone.attributes.put(entry.getKey(), clone.attributeImpls.get(entry.getValue().getClass()));
  }
 }
 
 return clone;
}

origin: org.apache.lucene/lucene-core

@Override
public CharTermAttributeImpl clone() {
 CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
 // Do a deep clone
 t.termBuffer = new char[this.termLength];
 System.arraycopy(this.termBuffer, 0, t.termBuffer, 0, this.termLength);
 t.builder = new BytesRefBuilder();
 t.builder.copyBytes(builder.get());
 return t;
}

origin: org.infinispan/infinispan-embedded-query

@Override
public PayloadAttributeImpl clone()  {
 PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
 if (payload != null) {
  clone.payload = BytesRef.deepCopyOf(payload);
 }
 return clone;
}
origin: gncloud/fastcatsearch

@Override
public PayloadAttributeImpl clone()  {
 PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
 if (payload != null) {
  clone.payload = payload.clone();
 }
 return clone;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
public PayloadAttributeImpl clone()  {
 PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
 if (payload != null) {
  clone.payload = BytesRef.deepCopyOf(payload);
 }
 return clone;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
public AttributeImpl clone() {
 BytesTermAttributeImpl c = (BytesTermAttributeImpl)super.clone();
 copyTo(c);
 return c;
}
origin: harbby/presto-connectors

@Override
public PayloadAttributeImpl clone()  {
 PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
 if (payload != null) {
  clone.payload = BytesRef.deepCopyOf(payload);
 }
 return clone;
}
origin: org.infinispan/infinispan-embedded-query

@Override
public AttributeImpl clone() {
 BytesTermAttributeImpl c = (BytesTermAttributeImpl)super.clone();
 copyTo(c);
 return c;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

 @Override
 public State clone() {
  State clone = new State();
  clone.attribute = attribute.clone();
  
  if (next != null) {
   clone.next = next.clone();
  }
  
  return clone;
 }
}
origin: gncloud/fastcatsearch

 @Override
 public State clone() {
  State clone = new State();
  clone.attribute = attribute.clone();
  
  if (next != null) {
   clone.next = next.clone();
  }
  
  return clone;
 }
}
origin: org.infinispan/infinispan-embedded-query

 @Override
 public State clone() {
  State clone = new State();
  clone.attribute = attribute.clone();
  
  if (next != null) {
   clone.next = next.clone();
  }
  
  return clone;
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

@Override
public CharTermAttributeImpl clone() {
 CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
 // Do a deep clone
 t.termBuffer = new char[this.termLength];
 System.arraycopy(this.termBuffer, 0, t.termBuffer, 0, this.termLength);
 t.builder = new BytesRefBuilder();
 t.builder.copyBytes(builder.get());
 return t;
}

origin: harbby/presto-connectors

@Override
public CharTermAttributeImpl clone() {
 CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
 // Do a deep clone
 t.termBuffer = new char[this.termLength];
 System.arraycopy(this.termBuffer, 0, t.termBuffer, 0, this.termLength);
 t.builder = new BytesRefBuilder();
 t.builder.copyBytes(builder.get());
 return t;
}

origin: org.infinispan/infinispan-embedded-query

@Override
public CharTermAttributeImpl clone() {
 CharTermAttributeImpl t = (CharTermAttributeImpl)super.clone();
 // Do a deep clone
 t.termBuffer = new char[this.termLength];
 System.arraycopy(this.termBuffer, 0, t.termBuffer, 0, this.termLength);
 t.builder = new BytesRefBuilder();
 t.builder.copyBytes(builder.get());
 return t;
}

origin: harbby/presto-connectors

@Override
public GeoPointTermAttributeImpl clone() {
 GeoPointTermAttributeImpl t = (GeoPointTermAttributeImpl)super.clone();
 // Do a deep clone
 t.bytes = new BytesRefBuilder();
 t.bytes.copyBytes(getBytesRef());
 return t;
}
origin: harbby/presto-connectors

@Override
public NumericTermAttributeImpl clone() {
 NumericTermAttributeImpl t = (NumericTermAttributeImpl)super.clone();
 // Do a deep clone
 t.bytes = new BytesRefBuilder();
 t.bytes.copyBytes(getBytesRef());
 return t;
}
origin: org.infinispan/infinispan-embedded-query

@Override
public NumericTermAttributeImpl clone() {
 NumericTermAttributeImpl t = (NumericTermAttributeImpl)super.clone();
 // Do a deep clone
 t.bytes = new BytesRefBuilder();
 t.bytes.copyBytes(getBytesRef());
 return t;
}
org.apache.lucene.utilAttributeImplclone

Javadoc

Shallow clone. Subclasses must override this if they need to clone any members deeply,

Popular methods of AttributeImpl

  • clear
    Clears the values in this AttributeImpl and resets it to its default value. If this implementation i
  • copyTo
    Copies the values from this Attribute into the passed-in target attribute. The target implementation
  • reflectWith
    This method is for introspection of attributes, it should simply add the key/values this attribute h
  • end
    Clears the values in this AttributeImpl and resets it to its value at the end of the field. If this

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Kernel (java.awt.image)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now