Provides an Iterator from a given initial path that traverses the entire tree, allows both forwards and backwards iteration.
To provide a writer to LSSerializer (and anything else that wants it _) we need to wrap appendables.
Provides the conversion type class AsBoolean, and simple matchers (extractor builders) to use them.
Use to make it easier to filter out large sets (for those that aren't interesting simply asis them, see tests for use case)
Array backed buffer, restart returns the captured data and then rejoins the original iterator
Mostly exists for pulling but it is general
Simple helper functions to get and remove ConcurrentLinkedQueues from a ConcurrentHashMap
Simple factory interface
Iterates over paths using the document order it skips over EndElemS events when going forward and StartElem when reversing, returning just the path.
Remove neighbouring duplicates based on a given predicate (defaults to _ eq _).
Similar to the scala DynamicVariable except that StackedThreadLocal is used and therefore remove is performed after the last pop.
Either is great, perfect for what is needed, except for the indirection and the added memory and cpu costs thereof.
Evals once, the developer must check its Done, equivalent to a .
Backwards compat for 2.
Represents the base for operations that fold over a list of paths
Object arrays are just faster, System.
Don't add the offset and length, for building a dom this save 8 per elem, only matters for large docs (can save 4mb from 54mb), but can't hurt small ones.
Behaves like an ArrayList/ArrayBuffer, growing an internal array as necessary
Wraps behaviour of ImmutableArray like objects, when the array is greater than 31 it will be swapped to Vector.
Build array first then vector as needed
Object arrays are just faster, System.
badly named the boolean should indicate if it has any children
badly named the boolean should indicate if it has any children
Collection of iterateees
Based on Scala ListSet, users provide the comparisom operator and comparisom type for lookups.
Simple loglevel marker trait
Very simple logger, matches scala more.
Simple trait for logging.
Position in a parent Paths children
Only created once and via calcOnce
Provide & combinator to pass the result of one fold onto the other, in the case of failure no further joined functions will be called.
Utility functions for Paths, sorting, moving between Paths, getting to the root etc.
Simple pool interface
Positions only have meaning for a given Path(s).
Wrap the InputStream to allow better bracketing etc.
Wrap the Reader to allow better bracketing etc.
Allows replacing one path with many, may be easier to use the * version however
Allows foldPositions to be nested, only replace and delete makes sense here (afaict).
Based on the approach taken by Muse and others giving paramaterized messages using XXX as a token to replace.
Allows the user to extend a user package object with the scales.
IF hasChildren then isStart indicates that this particular occurence is the start of the element or the end
Thread safe unbounded pool, if more objects are required it will simple create them.
Mimics ThreadLocalStorage except that the current tls value is the head of a stack.
Represents the Top for a given Path, there isn't a tree above this
Proxy Vector.
Starts an ImmutableArrayProxy and provides the CanBuildFrom
See normal Scala lib, its got alot more in nowadays.
General Scala to Iterable converters, allowing for java use.
Contains the logic for getting a logger
Currently thread safe, java doc issue pending http://bugs.
Allows importing all scales.
Append to an appendable, always returns Done for a line, cont for everything else TODO - should it be a pair including the appendable?
Append to an appendable, always returns Done for a line, cont for everything else TODO - should it be a pair including the appendable?
Calls eval to return a T t'.
Calls eval to return a T t'. This T is then evaluated with the AsBoolean type class.
When evaluated to true (t',x) is returned. val Matcher = booleanMatcher( (x) => T ); val Matcher(t,x) = x
Calls eval to return a T t'.
Calls eval to return a T t'. This T is then evaluated with the AsBoolean type class.
When evaluated to true t' is returned. val Matcher = booleanMatcher( (x) => T ); val Matcher(t) = x
Calculates the value once and only once (using a lazy val), returning the result, use this approach for expensive calculations.
Calculates the value once and only once (using a lazy val), returning the result, use this approach for expensive calculations.
Collects the first Some
Collects the first Some
When paths are not in the same root, they are compared based on the identity hash of the given roots.
When paths are not in the same root, they are compared based on the identity hash of the given roots. Of course this relies on that function having a decent vm implementation.
1 if path1 is before path2, -1 if path2 is before path1, 0 if they are the same and NotSameRoot+-1 if they are not in the same root
When paths are not in the same root, they are compared based on the identity hash of the given roots.
When paths are not in the same root, they are compared based on the identity hash of the given roots. Of course this relies on that function having a decent vm implementation. See http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-document-order, tree order must remain constant. Its also a pretty sensible approach for non xml trees.
1 if path1 is before path2, -1 if path2 is before path1, 0 if they are the same and NotSameRoot+-1 if they are not in the same root
Helper for comparePaths, will not evaluate position if the paths are equal
Helper for comparePaths, will not evaluate position if the paths are equal
Deepest last child
Deepest last child
A usable default of UTF8 NOT the vm's Charset.
A usable default of UTF8 NOT the vm's Charset.defaultCharset based on its locale, use vmDefaultCharset for that
drop while iteratee
drop while iteratee
Are these two parameters (convertable to a C) equal for a given Equiv[C] instance
Calls the function param with the fed data and returns its result
Calls the function param with the fed data and returns its result
Extract the Some(value) from a Done or None if it was not Done.
Extract the Some(value) from a Done or None if it was not Done.
Extract the continuation from a Done
Extract the continuation from a Done
filter iteratee, greedily taking all content until eof
filter iteratee, greedily taking all content until eof
"find" iteratee, finds Some(first) or None
"find" iteratee, finds Some(first) or None
Stepwise fold, each element is evaluated but each one is returned as a result+resumable iter.
Stepwise fold, each element is evaluated but each one is returned as a result+resumable iter.
Folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF.
Folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF. If there is a ping pong on enumerator -> Cont -> enumerator then we'll of course get an infinite loop.
foldI returns a ResumableIter that performs a fold until a done, this folds over the enumerator to return a value.
combine with onDone to get through chunks of data.
Folds over positions within a single path, for example all given children.
Folds over positions within a single path, for example all given children. As such positions must be calculated.
Takes the first root, returning Right(NoSingleRoot) if any of the subsequent roots don't match.
folder retrieves the current path
Each iteration folds the resulting tree back into the path. As this function must maintain the Path it does not expose the new path root until the result.
As per the non accumalating version, folds over positions within a given tree but allows for an additional accumalation.
As per the non accumalating version, folds over positions within a given tree but allows for an additional accumalation.
The progress through the document is in reverse document order. This ensures that transformations can always be safely composed, e.g. a delete of a path won't stop changes below it. This, however, implies the developer must also handle any accumalation in "reverse".
gets the next following:: sibling in document order
gets the next following:: sibling in document order
Helper to identify dones
Helper to identify dones
Helper for done and eof
Helper for done and eof
Helper for done and empty
Helper for done and empty
Makes a StringBuilder from an iterable using the builder parameter.
Makes a StringBuilder from an iterable using the builder parameter.
Navigates the path until the new position is reached, throws if either its a new root or the position is not reachable
Navigates the path until the new position is reached, throws if either its a new root or the position is not reachable
onDone, iterates over the list of iteratees applying the element, when the resulting list contains a Done then the list of Dones is returned.
onDone, iterates over the list of iteratees applying the element, when the resulting list contains a Done then the list of Dones is returned.
One can use tuples or pattern matching to discern which of the original lists iteratees have matched.
Due to the return type of this iteratee all items in the list must return the same type and must return both an A and an IterV with the same interface to continue with the next and maintain state.
In the case of EOF, an empty list is returned
Obtain the positions for the paths
Obtain the positions for the paths
positions with tuples (T, Path)
positions with tuples (T, Path)
gets the next preceding:: sibling equivalent in document order, unlike XPath preceding:: it does not exclude parents
gets the next preceding:: sibling equivalent in document order, unlike XPath preceding:: it does not exclude parents
Removes the value, returning either it or a new item (stops end code worrying about nulls etc.
Removes the value, returning either it or a new item (stops end code worrying about nulls etc..
Simple grabber of resources
Returns the root path for its input, uses zipUp to ensure changes are kept
Returns the root path for its input, uses zipUp to ensure changes are kept
keeps a running count of each element, probably not of much use unless combined but acts as a good poc for ResumableIter
keeps a running count of each element, probably not of much use unless combined but acts as a good poc for ResumableIter
Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.
Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.
Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.
Sorts according to position of each path item, descending or descending based on a depth first then rightwise order.
sortPositions with a tuple T, Path
sortPositions with a tuple T, Path
sort with a tuple T, Path
sort with a tuple T, Path
Provides an instance of the Equal type class for positional Equality
Provides an instance of the Equal type class for positional Equality
Converts a normal IterV[E,A] to a ResumableIter.
Converts a normal IterV[E,A] to a ResumableIter.
Does so by folding over the iter once for an input and when its Done starting again with the original iter. This is close to restarting the iter on a new "stream", otherwise all attempts to keep the Cont will be made.
retrieves the value of a concurrent hashmap against a given key, creating if necessary.
retrieves the value of a concurrent hashmap against a given key, creating if necessary. Note it makes no gaurantee of once only semantics for the value generation
The jvm's default charset, based on system/machine/locale
The jvm's default charset, based on system/machine/locale
Converts the iteratee/enumerator/source triple into a Iterator
Converts the iteratee/enumerator/source triple into a Iterator
Alot of this has since been included in the Scala standard lib, as such its pretty much unused, included incase.