org.vostok.glob
Class PriorityGlobList

java.lang.Object
  extended by org.vostok.lang.PriorityList
      extended by org.vostok.glob.PriorityGlobList
All Implemented Interfaces:
java.lang.Iterable<org.vostok.lang.Entry>, java.util.Collection<org.vostok.lang.Entry>

public class PriorityGlobList
extends org.vostok.lang.PriorityList

a PriorityGlobList is a specialised PriorityList to work with glob object. to create new entry, you should use static.createEntry format of an entry : entry.key : a key, entry.value : a Glob object.

Author:
levreau.jerome@vostoksystem.eu

Field Summary
 
Fields inherited from class org.vostok.lang.PriorityList
array, DEFAULT_GROW_STEP, DEFAULT_ITEM_RELOCATION_DEPRECIATION, DEFAULT_PRIORITY_ZONE, DEFAULT_PRIORITY_ZONE_DEPRECIATION, DEFAULT_SIZE, growStep, initialPriorityZone, initialSize, itemDepreciation, priorityDepreciation, priorityZone, size
 
Constructor Summary
PriorityGlobList()
           
 
Method Summary
static org.vostok.lang.Entry createEntry(java.lang.String key, java.lang.String pattern)
          convenience method, will return an entry fully compatible.
 org.vostok.lang.Entry matchfile(java.lang.String data)
          found a match for "data"
 
Methods inherited from class org.vostok.lang.PriorityList
add, add, addAll, clear, contains, containsAll, find, find, find, findPosition, findPosition, isEmpty, iterator, remove, removeAll, removeByKey, retainAll, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

PriorityGlobList

public PriorityGlobList()
Method Detail

createEntry

public static org.vostok.lang.Entry createEntry(java.lang.String key,
                                                java.lang.String pattern)
                                         throws java.util.regex.PatternSyntaxException
convenience method, will return an entry fully compatible. A Glob.CASE_INSENSITIVE will be compiled

Parameters:
key - key to associace with the pattern
pattern -
Returns:
Throws:
java.util.regex.PatternSyntaxException

matchfile

public org.vostok.lang.Entry matchfile(java.lang.String data)
found a match for "data"

Parameters:
data - source data to look against
Returns:
an entry from the list that match "data", or null if none were found