org.lirc.util
Class LIRCMapSetup

java.lang.Object
  |
  +--org.lirc.util.LIRCMapSetup

public class LIRCMapSetup
extends java.lang.Object

Helps setup a new LIRCMap.

Version:
$Revision: 1.5 $
Author:
Bjorn Bringert (bjorn@mumblebee.com)

Constructor Summary
LIRCMapSetup(java.util.Set values)
          Creates a new LIRCMapSetup.
 
Method Summary
 LIRCMap getMap()
          Gets the LIRCMap that this object sets up.
 boolean hasNext()
          Returns true if there are more values that need to have a button mapped to them.
 java.lang.String nextName()
          Moves on to the next value.
 void setCurrent(java.lang.String button)
          Maps a button to the current value, matching any remote.
 void setCurrent(java.lang.String button, java.lang.String remote)
          Maps a button to the current value.
 void setCurrent(java.lang.String button, java.lang.String remote, int repeat)
          Maps a button to the current value, matching any remote.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LIRCMapSetup

public LIRCMapSetup(java.util.Set values)
Creates a new LIRCMapSetup.
Parameters:
values - the set of values (strings) that need to be mapped
Method Detail

getMap

public LIRCMap getMap()
Gets the LIRCMap that this object sets up.

hasNext

public boolean hasNext()
Returns true if there are more values that need to have a button mapped to them. A true value guarantees that nextName() can be called at least once.

nextName

public java.lang.String nextName()
Moves on to the next value.
Returns:
the name of the new value that needs a button

setCurrent

public void setCurrent(java.lang.String button)
Maps a button to the current value, matching any remote.
Parameters:
button - name of the button

setCurrent

public void setCurrent(java.lang.String button,
                       java.lang.String remote)
Maps a button to the current value.
Parameters:
button - name of the button
remote - name of the remote

setCurrent

public void setCurrent(java.lang.String button,
                       java.lang.String remote,
                       int repeat)
Maps a button to the current value, matching any remote.
Parameters:
button - name of the button
remote - name of the remote
repeat - repeat value