de.unikassel.android.sdcframework.data
Class SampleCollection

Package class diagram package SampleCollection
java.lang.Object
  extended by de.unikassel.android.sdcframework.data.SampleCollection
All Implemented Interfaces:
Parcelable, BroadcastableEvent, ObservableEvent, ObservableEventCollection<Sample>, Iterable<Sample>, Collection<Sample>

public class SampleCollection
extends Object
implements ObservableEventCollection<Sample>, BroadcastableEvent, Parcelable

Implementation of a collection of Samples.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
static String ACTION
          Our custom sample collection intent action
static Parcelable.Creator<SampleCollection> CREATOR
          The Parcelable creator.
static String PARCELABLE_EXTRA_NAME
          The parcelable extra name for intent transport.
private  List<Sample> samples
          The collection of sensor device Samples
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
SampleCollection()
          Constructor
SampleCollection(Parcel source)
          Constructor
 
Method Summary
 boolean add(Sample sample)
           
 boolean addAll(Collection<? extends Sample> samples)
           
 void clear()
          Method to clear the collection
 boolean contains(Object object)
           
 boolean containsAll(Collection<?> samples)
           
 int describeContents()
           
 Intent getIntent()
          Getter for an intent representation
 List<Sample> getSamples()
          Access to the collection
 boolean isEmpty()
           
 Iterator<Sample> iterator()
           
 boolean remove(Object object)
           
 boolean removeAll(Collection<?> samples)
           
 boolean retainAll(Collection<?> samples)
           
 void setSamples(List<Sample> samples)
          Setter for the samples
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] array)
           
 String toString()
           
 void writeToParcel(Parcel dest, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

ACTION

public static final String ACTION
Our custom sample collection intent action

See Also:
Constant Field Values

PARCELABLE_EXTRA_NAME

public static final String PARCELABLE_EXTRA_NAME
The parcelable extra name for intent transport.


CREATOR

public static final Parcelable.Creator<SampleCollection> CREATOR
The Parcelable creator.


samples

private List<Sample> samples
The collection of sensor device Samples

Constructor Detail

SampleCollection

public SampleCollection()
Constructor


SampleCollection

public SampleCollection(Parcel source)
Constructor

Parameters:
source - the parcel source
Method Detail

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)
Specified by:
writeToParcel in interface Parcelable

setSamples

public final void setSamples(List<Sample> samples)
Setter for the samples

Parameters:
samples - the samples to set

getSamples

public List<Sample> getSamples()
Access to the collection

Returns:
the sample collection

clear

public void clear()
Method to clear the collection

Specified by:
clear in interface Collection<Sample>

toString

public String toString()
Overrides:
toString in class Object

add

public boolean add(Sample sample)
Specified by:
add in interface Collection<Sample>

addAll

public boolean addAll(Collection<? extends Sample> samples)
Specified by:
addAll in interface Collection<Sample>

contains

public boolean contains(Object object)
Specified by:
contains in interface Collection<Sample>

containsAll

public boolean containsAll(Collection<?> samples)
Specified by:
containsAll in interface Collection<Sample>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Sample>

iterator

public Iterator<Sample> iterator()
Specified by:
iterator in interface Iterable<Sample>
Specified by:
iterator in interface Collection<Sample>

remove

public boolean remove(Object object)
Specified by:
remove in interface Collection<Sample>

removeAll

public boolean removeAll(Collection<?> samples)
Specified by:
removeAll in interface Collection<Sample>

retainAll

public boolean retainAll(Collection<?> samples)
Specified by:
retainAll in interface Collection<Sample>

size

public int size()
Specified by:
size in interface Collection<Sample>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Sample>

toArray

public <T> T[] toArray(T[] array)
Specified by:
toArray in interface Collection<Sample>

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

getIntent

public Intent getIntent()
Description copied from interface: BroadcastableEvent
Getter for an intent representation

Specified by:
getIntent in interface BroadcastableEvent
Returns:
the Intent representation of this LogEvent