// Path: src/main/java/com/tomgibara/bits/BitStore.java
// interface DisjointMatches extends Matches {
// 
// 	/**
// 	 * Overlapping matches of the same bit sequence over the same
// 	 * {@link BitStore}.
// 	 *
// 	 * @return overlapping matches
// 	 */
// 
// 	OverlappingMatches overlapping();
// 
// 	@Override
// 	DisjointMatches range(int from, int to);
// 
// 	/**
// 	 * Whether every bit in the {@link BitStore} is accommodated within a
// 	 * match of the bit sequence.
// 	 *
// 	 * @return whether the matches cover every bit in the {@link BitStore}
// 	 */
// 
// 	boolean isAll();
// 
// 	/**
// 	 * Whether there are no matched bits.
// 	 *
// 	 * @return whether there are no matches over the {@link BitStore}
// 	 */
// 
// 	boolean isNone();
// 
// 	/**
// 	 * Replaces all non-overlapping matches of the sequence with a new
// 	 * sequence of the same size.
// 	 *
// 	 * @param replacement
// 	 *            a replacement bit sequence
// 	 * @throws IllegalArgumentException
// 	 *             if the replacement size does not match the sequence size.
// 	 * @throws IllegalStateException
// 	 *             if the underlying store is immutable
// 	 */
// 
// 	void replaceAll(BitStore replacement);
// 
// 	/**
// 	 * Replaces all the bits of every non-overlapping match with the
// 	 * specified bit.
// 	 *
// 	 * @param bits
// 	 *            the replacement for matched bits
// 	 * @throws IllegalStateException
// 	 *             if the underlying store is immutable
// 	 */
// 
// 	void replaceAll(boolean bits);
// 
// }
// 
// Path: src/main/java/com/tomgibara/bits/BitStore.java
// interface OverlappingMatches extends Matches {
// 
// 	/**
// 	 * Disjoint matches of the same bit sequence over the same
// 	 * {@link BitStore}.
// 	 *
// 	 * @return disjoint matches
// 	 */
// 
// 	DisjointMatches disjoint();
// 
// 	@Override
// 	OverlappingMatches range(int from, int to);
// 
// }


import com.tomgibara.bits.BitStore.DisjointMatches;
import com.tomgibara.bits.BitStore.OverlappingMatches;
package com.tomgibara.bits;


class BitStoreDisjointMatches extends AbstractDisjointMatches {

	private final OverlappingMatches matches;

	BitStoreDisjointMatches(OverlappingMatches matches) {
		super(matches);
		this.matches = matches;
	}

	BitStoreDisjointMatches(BitStoreOverlappingMatches matches) {
		super(matches);
		this.matches = matches;
	}

	@Override
	public OverlappingMatches overlapping() {
		return matches;
	}

	@Override
// Path: src/main/java/com/tomgibara/bits/BitStore.java
// interface DisjointMatches extends Matches {
// 
// 	/**
// 	 * Overlapping matches of the same bit sequence over the same
// 	 * {@link BitStore}.
// 	 *
// 	 * @return overlapping matches
// 	 */
// 
// 	OverlappingMatches overlapping();
// 
// 	@Override
// 	DisjointMatches range(int from, int to);
// 
// 	/**
// 	 * Whether every bit in the {@link BitStore} is accommodated within a
// 	 * match of the bit sequence.
// 	 *
// 	 * @return whether the matches cover every bit in the {@link BitStore}
// 	 */
// 
// 	boolean isAll();
// 
// 	/**
// 	 * Whether there are no matched bits.
// 	 *
// 	 * @return whether there are no matches over the {@link BitStore}
// 	 */
// 
// 	boolean isNone();
// 
// 	/**
// 	 * Replaces all non-overlapping matches of the sequence with a new
// 	 * sequence of the same size.
// 	 *
// 	 * @param replacement
// 	 *            a replacement bit sequence
// 	 * @throws IllegalArgumentException
// 	 *             if the replacement size does not match the sequence size.
// 	 * @throws IllegalStateException
// 	 *             if the underlying store is immutable
// 	 */
// 
// 	void replaceAll(BitStore replacement);
// 
// 	/**
// 	 * Replaces all the bits of every non-overlapping match with the
// 	 * specified bit.
// 	 *
// 	 * @param bits
// 	 *            the replacement for matched bits
// 	 * @throws IllegalStateException
// 	 *             if the underlying store is immutable
// 	 */
// 
// 	void replaceAll(boolean bits);
// 
// }
// 
// Path: src/main/java/com/tomgibara/bits/BitStore.java
// interface OverlappingMatches extends Matches {
// 
// 	/**
// 	 * Disjoint matches of the same bit sequence over the same
// 	 * {@link BitStore}.
// 	 *
// 	 * @return disjoint matches
// 	 */
// 
// 	DisjointMatches disjoint();
// 
// 	@Override
// 	OverlappingMatches range(int from, int to);
// 
// }


// Path: src/main/java/com/tomgibara/bits/BitStoreDisjointMatches.java
import com.tomgibara.bits.BitStore.DisjointMatches;
import com.tomgibara.bits.BitStore.OverlappingMatches;

package com.tomgibara.bits;


class BitStoreDisjointMatches extends AbstractDisjointMatches {

	private final OverlappingMatches matches;

	BitStoreDisjointMatches(OverlappingMatches matches) {
		super(matches);
		this.matches = matches;
	}

	BitStoreDisjointMatches(BitStoreOverlappingMatches matches) {
		super(matches);
		this.matches = matches;
	}

	@Override
	public OverlappingMatches overlapping() {
		return matches;
	}

	@Override
	public DisjointMatches range(int from, int to) {