TrueZIP File* 7.0

de.schlichtherle.truezip.file
Class ThreadLocalMatcher

java.lang.Object
  extended by java.lang.ThreadLocal<Matcher>
      extended by de.schlichtherle.truezip.file.ThreadLocalMatcher

@ThreadSafe
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
final class ThreadLocalMatcher
extends ThreadLocal<Matcher>

A thread local Matcher. This class is intended to be used in multithreaded environments for high performance pattern matching.

See Also:
reset(CharSequence)

Field Summary
private  Pattern pattern
           
 
Constructor Summary
ThreadLocalMatcher(Pattern pattern)
          Constructs a new thread local matcher by using the given pattern.
 
Method Summary
protected  Matcher initialValue()
           
 Matcher reset(CharSequence input)
          Resets the thread local matcher with the given character sequence and returns it.
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

private final Pattern pattern
Constructor Detail

ThreadLocalMatcher

public ThreadLocalMatcher(Pattern pattern)
Constructs a new thread local matcher by using the given pattern.

Parameters:
pattern - the pattern to be used.
Method Detail

initialValue

protected final Matcher initialValue()
Overrides:
initialValue in class ThreadLocal<Matcher>

reset

public final Matcher reset(CharSequence input)
Resets the thread local matcher with the given character sequence and returns it.


TrueZIP File* 7.0

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.