org.fosstrak.llrp.commander.util
Class LLRPArrayConstraint

java.lang.Object
  extended by org.fosstrak.llrp.commander.util.LLRPArrayConstraint

public class LLRPArrayConstraint
extends java.lang.Object

This class represents an LLRP constraint stating that a certain array field must not be empty.

Author:
Ulrich Etter, ETHZ

Constructor Summary
LLRPArrayConstraint(java.lang.String messageOrParameterName, java.lang.String fieldName, int[] defaultValue)
          Creates a new array constraint.
 
Method Summary
 int[] getDefaultValue()
           
 java.lang.String getErrorMessage()
           
 java.lang.String getFieldName()
           
 java.lang.String getMessageOrParameterName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LLRPArrayConstraint

public LLRPArrayConstraint(java.lang.String messageOrParameterName,
                           java.lang.String fieldName,
                           int[] defaultValue)
Creates a new array constraint.

Example:
To create a constraint that specifies that the array field AntennaIDs of the parameter AISpec must not be empty and has 0 as default value, use the following code:
new LLRPArrayConstraint( "AISpec", "AntennaIDs", new int[]{0}),

Parameters:
messageOrParameterName - the message/parameter this constraint is defined for
fieldName - the name of the field this constraint is defined for
defaultValue - a default value for the field this constraint is defined for
Method Detail

getErrorMessage

public java.lang.String getErrorMessage()
Returns:
the error message associated with this constraint

getMessageOrParameterName

public java.lang.String getMessageOrParameterName()
Returns:
the message/parameter this constraint is defined for

getFieldName

public java.lang.String getFieldName()
Returns:
the sub-parameter this constraint is defined for

getDefaultValue

public int[] getDefaultValue()
Returns:
the default value for the field this constraint is defined for


Copyright © 2009. All Rights Reserved.