Synthia
Generic and flexible data structure generator
examples.apache.VisitorPicker Class Reference

Detailed Description

A picker producing instances of visitors.

Definition at line 32 of file VisitorPicker.java.

Inheritance diagram for examples.apache.VisitorPicker:

Classes

class  LogLinePicker
 Picker that produces log lines.
 

Public Member Functions

 VisitorPicker (Picker< Long > timestamp, Picker< String > ip, MarkovChain< String > map)
 
Picker< LogLinepick ()
 Picks an object. More...
 
Picker< Picker< LogLine > > duplicate (boolean with_state)
 Creates a copy of the picker. More...
 
void reset ()
 Puts the picker back into its initial state. More...
 

Protected Attributes

Picker< Float > m_floatSource
 
Picker< String > m_ip
 
MarkovChain< String > m_map
 
Picker< Long > m_timestamp
 

Constructor & Destructor Documentation

◆ VisitorPicker()

examples.apache.VisitorPicker.VisitorPicker ( Picker< Long >  timestamp,
Picker< String >  ip,
MarkovChain< String >  map 
)

Definition at line 42 of file VisitorPicker.java.

Member Function Documentation

◆ duplicate()

Picker<Picker<LogLine> > examples.apache.VisitorPicker.duplicate ( boolean  with_state)

Creates a copy of the picker.

Parameters
with_stateIf set to false, the returned copy is set to the class' initial state (i.e. same thing as calling the picker's constructor). If set to true, the returned copy is put into the same internal state as the object it is copied from.
Returns
The copy of the picker

Implements ca.uqac.lif.synthia.Picker< T >.

Definition at line 58 of file VisitorPicker.java.

◆ pick()

Picker<LogLine> examples.apache.VisitorPicker.pick ( )

Picks an object.

Typically, this method is expected to return non-null objects; a null return value is used to signal that no more objects will be produced. That is, once this method returns null, it should normally return null on all subsequent calls.

Returns
The object

Implements ca.uqac.lif.synthia.Picker< T >.

Definition at line 51 of file VisitorPicker.java.

◆ reset()

void examples.apache.VisitorPicker.reset ( )

Puts the picker back into its initial state.

This means that the sequence of calls to pick() will produce the same values as when the object was instantiated.

Implements ca.uqac.lif.synthia.Picker< T >.

Definition at line 65 of file VisitorPicker.java.

Member Data Documentation

◆ m_floatSource

Picker<Float> examples.apache.VisitorPicker.m_floatSource
protected

Definition at line 34 of file VisitorPicker.java.

◆ m_ip

Picker<String> examples.apache.VisitorPicker.m_ip
protected

Definition at line 36 of file VisitorPicker.java.

◆ m_map

MarkovChain<String> examples.apache.VisitorPicker.m_map
protected

Definition at line 38 of file VisitorPicker.java.

◆ m_timestamp

Picker<Long> examples.apache.VisitorPicker.m_timestamp
protected

Definition at line 40 of file VisitorPicker.java.


The documentation for this class was generated from the following file: