Package com.uic.ase.proj.xbn.util

Examples of com.uic.ase.proj.xbn.util.RangeConfig


    @param  r_ange  The Range to copy.  May not be null.
   **/
  public Range(Range r_ange)  {
    try  {
      rConfig = new RangeConfig(r_ange.rConfig);
    catch(NullPointerException npx)  {
      throwAX("constructor:  r_ange is null.");
    }

    iValue = r_ange.iValue;
View Full Code Here


    <P>Get the int value of a parameter.</P>

    @return <CODE><A HREF="~JD~getInt(s,b,i,rc)~EJD~">getInt</A>(s_optionName, false, -1, (new <A HREF="~JD~rc#rc()~EJD~">RangeConfig</A>()))</CODE>
   **/
  public final int getInt(String s_optionName)  {
    return getInt(s_optionName, false, -1, (new RangeConfig()));
  }
View Full Code Here

    <P>Get the int value of a parameter.  If the parameter was not provided, use an alternate default value.</P>

    @return <CODE><A HREF="~JD~getInt(s,b,i,rc)~EJD~">getInt</A>(s_optionName, true, i_defaultValue, (new <A HREF="~JD~rc#rc()~EJD~">RangeConfig</A>()))</CODE>
   **/
  public final int getInt(String s_optionName, int i_defaultValue)  {
    return getInt(s_optionName, true, i_defaultValue, (new RangeConfig()));
  }
View Full Code Here

    <P>Create an unrestricted PARIElement.</P>

    <P>Equal to <CODE><A HREF="~JD~parie(rc)~EJD~">PARIElement</A>(new <A HREF="~JD~rc#rc()~EJD~">RangeConfig</A>())</CODE></P>
   **/
  public PARIElement()  {
    this(new RangeConfig());
  }
View Full Code Here

    <P>Create a PARIElement.</P>

    <P>Equal to <CODE><A HREF="~JD~parie(rc,i[])~EJD~">PARIElement</A>((new <A HREF="~JD~rc#rc()~EJD~">RangeConfig</A>()), ai_illegal)</CODE></P>
   **/
  public PARIElement(int[] ai_illegal)  {
    this((new RangeConfig()), ai_illegal);
  }
View Full Code Here

    protected final Object clone() throws CloneNotSupportedException  {
      return new PARIElement(rc, aiIllegal, apiIllegal);
    }

    private PARIElement(RangeConfig range_config, int[] ai_illegal, APInt api_illegal)  {
      rc = new RangeConfig(range_config);
      aiIllegal = ai_illegal;
      apiIllegal = api_illegal.getAPIClone();
    }
View Full Code Here

    //To make the below code a bit more consice...START
      boolean bNullOk = getPARInt().getPARDupNullLen().isNullOk();
      RCLength rclArray = getPARInt().getPARDupNullLen().getRCLength();
      boolean bDupsOk = getPARInt().getPARDupNullLen().areDupsOk();
      boolean bOrdered = getPARInt().getPAROrderDir().isOrdered();
      RangeConfig rcLmnt = getPARInt().getPARIElement().getRangeConfig();

      boolean bAXIfBad = (s_callingClsFnc != null  ||  s_varName != null);
    //To make the below code a bit more consice...END

    if(!bNullOk)  {
      if(isNull())  {
        setPAViolation(new PAViolation(PAViolation.getType_NULL()));
        if(bAXIfBad)  {
          throwAXIllegal(s_callingClsFnc, s_varName, "isNull() equals true.");
        }
        return false;
      }

    }  else if(isNull())  {
      //A null array cannot be analyzed further.
      declareNoViolation();
      return true;
    }
    //The array is not null.

    if(!rclArray.isValid(getLength()))  {
      setPAViolation(new PAViolation(PAViolation.getType_LENGTH()));
      if(bAXIfBad)  {
        throwAXIllegal(s_callingClsFnc, s_varName, "the number of elements in the array (" + getLength() + ") is illegal according to getPARInt().getArrayRCL().isValid().");
      }
      return false;

    else if(getLength() < 1)  {
      //The array is zero elements in length, and this is okay.
      //An empty array can, but does not need to be analyzed further.
      declareNoViolation();
      return true;
    }
    //The string array has at least one element.

    final String sLMNT = "element ";

    for(int i = 0; i < getLength(); i++)  {
      if(!rcLmnt.isValid(getInt(i)))  {
        setPAViolation(new PAViolation(PAViolation.getType_ILMNT_OOBOUNDS(), i));
        if(bAXIfBad)  {
          throwAXIllegal(s_callingClsFnc, s_varName, sLMNT + i + " ('" + getInt(i) + "') is illegal according to getPARInt().getRCLength().isValid().");
        }
        return false;
View Full Code Here

TOP

Related Classes of com.uic.ase.proj.xbn.util.RangeConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.