org.jmythapi.protocol.response.impl
Class FreeInputsList

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<FreeInputsList.Props>
          extended by org.jmythapi.protocol.response.impl.FreeInputsList
All Implemented Interfaces:
Cloneable, Iterable<IInputInfoFree>, IPropertyAware<FreeInputsList.Props>, IVersionable, ISendable, IFreeInputList, IMythResponse<FreeInputsList.Props>

public class FreeInputsList
extends AMythResponse<FreeInputsList.Props>
implements Iterable<IInputInfoFree>, IFreeInputList

Since:
37

Nested Class Summary
static class FreeInputsList.Props
           
 
Field Summary
static String EMPTY_LIST
           
 
Fields inherited from class org.jmythapi.impl.AData
logger, propsClass, protoVersion, respArgs
 
Constructor Summary
FreeInputsList(IMythPacket packet)
           
 
Method Summary
 List<IInputInfoFree> asList()
          Gets the free-inputs as list
protected  void checkSize(List<String> responseArgs)
          The size of the response array must be a multiple of IInputInfoFree.Props.values().size().
 IInputInfoFree get(int idx)
          Gets the input at the given position.
 boolean isEmpty()
          Checks if this list is empty.
 Iterator<IInputInfoFree> iterator()
           
 int size()
          The size of this list
 String toString()
          Returns the content of this data object as a formatted string.
 
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse
decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex
 
Methods inherited from class org.jmythapi.impl.AData
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.IPropertyAware
getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 

Field Detail

EMPTY_LIST

public static final String EMPTY_LIST
See Also:
Constant Field Values
Constructor Detail

FreeInputsList

public FreeInputsList(IMythPacket packet)
Method Detail

checkSize

protected void checkSize(List<String> responseArgs)
                  throws IllegalArgumentException
The size of the response array must be a multiple of IInputInfoFree.Props.values().size(). There is no size value at the beginning of the response list (e.g. as available for program-lists).

Overrides:
checkSize in class AMythResponse<FreeInputsList.Props>
Parameters:
responseArgs - the response-argument-list
Throws:
IllegalArgumentException - if expected arguments are missing.

asList

public List<IInputInfoFree> asList()
Description copied from interface: IFreeInputList
Gets the free-inputs as list

Specified by:
asList in interface IFreeInputList
Returns:
the input devices as list

get

public IInputInfoFree get(int idx)
Description copied from interface: IFreeInputList
Gets the input at the given position.

Specified by:
get in interface IFreeInputList
Parameters:
idx - the input index
Returns:
the input

size

public int size()
Description copied from interface: IFreeInputList
The size of this list

Specified by:
size in interface IFreeInputList
Returns:
the size of this list

isEmpty

public boolean isEmpty()
Description copied from interface: IFreeInputList
Checks if this list is empty.

Specified by:
isEmpty in interface IFreeInputList
Returns:
true if the list is empty.

iterator

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

toString

public String toString()
Description copied from class: AData

Returns the content of this data object as a formatted string.

E.g.
 <0>TOTAL_RAM_MB: 1002 | <1>FREE_RAM_MB: 474 | <2>TOTAL_VM_MB: 853 | <3>FREE_VM_MB: 853
 

Overrides:
toString in class AData<FreeInputsList.Props>


Copyright © 2008-2013. All Rights Reserved.