Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangLong


  }
 
  @Test
  public void testToString7b()
  {
    Assert.assertEquals("234",ErlangLabel.dumpErlangObject(new OtpErlangLong(234)));
  }
View Full Code Here


 
  @Test
  public void testParse5a()
  {
    String text = " 45888888888";
    OtpErlangLong number = (OtpErlangLong)ErlangLabel.parseText(text);
    Assert.assertEquals(45888888888L,number.longValue());
    Assert.assertEquals(text.trim(),ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
View Full Code Here

 
  @Test
  public void testParse5b()
  {
    String text = " -458";
    OtpErlangLong number = (OtpErlangLong)ErlangLabel.parseText(text);
    Assert.assertEquals(-458L,number.longValue());
    Assert.assertEquals(text.trim(),ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
View Full Code Here

  }
 
  @Test
  public void testEvaluateTerm1()
  {
    Assert.assertEquals(new OtpErlangLong(25),runner.evaluateString("25"));
  }
View Full Code Here

  }
 
  @Test
  public void testEvaluateTerm1()
  {
    Assert.assertEquals(new OtpErlangLong(25),erl.evaluateString("25"));
  }
View Full Code Here

          OtpErlangObject stateNamesAsObject = message.elementAt(startFrom+1);
          setStateNamesToBeIgnored(((LayoutOptions)fsmPicture.getUserDatum(JUConstants.LAYOUTOPTIONS)),stateNamesAsObject);
        }
        if (message.arity() > startFrom+2)
        {
          OtpErlangLong windowNum = ((OtpErlangLong)message.elementAt(startFrom+2));windowNumber = windowNum.intValue();
        }
        if (message.arity() > startFrom+3)
        {
          OtpErlangLong abstraction = ((OtpErlangLong)message.elementAt(startFrom+3));
          ((LayoutOptions)fsmPicture.getUserDatum(JUConstants.LAYOUTOPTIONS)).componentsToPick=abstraction.intValue();
        }
      }
      return windowNumber;
    }
View Full Code Here

 
  @Test
  public void testParse5c()
  {
    String text = " +458";
    OtpErlangLong number = (OtpErlangLong)ErlangLabel.parseText(text);
    Assert.assertEquals(458L,number.longValue());
    Assert.assertEquals("458",ErlangLabel.dumpErlangObject(runner.evaluateString(text)));
  }
View Full Code Here

      return singleton;
    }

    @Override
    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      OtpErlangLong longValue = (OtpErlangLong) arg;
      resultHolder.append(longValue.longValue());
    }
View Full Code Here

      if (partB == null && partExp == null) {// integer/long
        if (partA.startsWith("+"))
          partA = partA.substring(1);
        long outcome = Long.parseLong(partA);
        if (outcome > Integer.MAX_VALUE || outcome < Integer.MIN_VALUE)
          result = new OtpErlangLong(outcome);
        else
          result = new OtpErlangInt((int) outcome);
      } else {// floating - point number.
        String textToParse = partA + "."
            + (partB == null ? "0" : partB)
View Full Code Here

        lower=lowerValue;upper=upperValue;
    }
   
    @Override
  public OtpErlangObject instantiate() {
        return new OtpErlangLong((upper-lower)/2);
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangLong

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.