pl.netanel.swt.matrix
Interface NumberCollection<N extends java.lang.Number>

Type Parameters:
N -
All Superinterfaces:
java.lang.Iterable<N>
All Known Subinterfaces:
NumberContinuum<N>, NumberList<N>, NumberSet<N>

public interface NumberCollection<N extends java.lang.Number>
extends java.lang.Iterable<N>

Common interface for NumberSet, NumberList and NumberContinuum.


Method Summary
 boolean contains(Extent<N> extent)
          Deprecated. use containsAll(Extent) instead
 boolean contains(N number)
          Returns true if this set contains the given number.
 boolean contains(N start, N end)
          Deprecated. use containsAll(Number, Number) instead
 boolean containsAll(Extent<N> extent)
          Returns true if this set contains all the numbers from the given range inclusively.
 boolean containsAll(N start, N end)
          Returns true if this set contains all the numbers from the given range inclusively.
 boolean containsAll(NumberCollection<N> set)
          Returns true if this set contains all the numbers from the given set.
 boolean containsAny(Extent<N> extent)
          Returns true if this set contains any the numbers from the given range inclusively.
 boolean containsAny(N start, N end)
           
 boolean containsAny(NumberCollection<N> set)
           
 NumberCollection<N> copyNumberCollection()
          Returns a copy of this collection.
 N getCount()
          Returns the number of items in the receiver.
 N getCount(N start, N end)
          Returns the number of items in the receiver between the values start and end inclusively.
 boolean isEmpty()
          Returns true if the receiver contains no items.
 ExtentSeq<N> seq()
          Experimental! Returns a sequence of number extents from this set.
 ExtentSeq<N> seq(int direction, N from, N to)
          Experimental!
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

isEmpty

boolean isEmpty()
Returns true if the receiver contains no items. Otherwise false is returned.

Returns:
true if this contains contains no items

getCount

N getCount()
Returns the number of items in the receiver.

Returns:
the number of items in the receiver

getCount

N getCount(N start,
           N end)
Returns the number of items in the receiver between the values start and end inclusively.

Returns:
the number of items in the receiver between the values start and end

contains

boolean contains(N number)
Returns true if this set contains the given number.

Parameters:
number - number whose presence in this set is to be tested
Returns:
true if this set contains the given number

contains

@Deprecated
boolean contains(N start,
                            N end)
Deprecated. use containsAll(Number, Number) instead

Returns true if this set contains all the numbers from the given range inclusively.

Parameters:
start - first index of the range of items
end - last index of the range of items
Returns:
true if this set contains the given range of numbers

contains

@Deprecated
boolean contains(Extent<N> extent)
Deprecated. use containsAll(Extent) instead

Returns true if this set contains all the numbers from the given range inclusively.

Parameters:
extent - extent of numbers whose presence in this set is to be tested
Returns:
true if this set contains the given range of numbers

containsAll

boolean containsAll(N start,
                    N end)
Returns true if this set contains all the numbers from the given range inclusively.

Parameters:
start - first index of the range of items
end - last index of the range of items
Returns:
true if this set contains the given range of numbers

containsAny

boolean containsAny(N start,
                    N end)

containsAll

boolean containsAll(Extent<N> extent)
Returns true if this set contains all the numbers from the given range inclusively.

Parameters:
extent - extent of numbers whose presence in this set is to be tested
Returns:
true if this set contains all the given range of numbers

containsAny

boolean containsAny(Extent<N> extent)
Returns true if this set contains any the numbers from the given range inclusively.

Parameters:
extent - extent of numbers whose presence in this set is to be tested
Returns:
true if this set contains any of the given range of numbers

containsAll

boolean containsAll(NumberCollection<N> set)
Returns true if this set contains all the numbers from the given set.

Parameters:
set - set of numbers whose presence in the receiver should be tested
Returns:
true if this set contains the given range of numbers

containsAny

boolean containsAny(NumberCollection<N> set)

seq

ExtentSeq<N> seq()
Experimental! Returns a sequence of number extents from this set.

Returns:
a sequence of number extents from this set

seq

ExtentSeq<N> seq(int direction,
                 N from,
                 N to)
Experimental!


copyNumberCollection

NumberCollection<N> copyNumberCollection()
Returns a copy of this collection.

Returns:
copy of this collection


Copyright © 2011 netanel.pl. All Rights Reserved.