Package org.apache.commons.lang3.mutable

Examples of org.apache.commons.lang3.mutable.MutableInt.intValue()


    cachingRecommender.recommend(2, 1, rescorer);
    assertEquals(7, recommendCount.intValue());
    cachingRecommender.recommend(1, 1, rescorer);
    assertEquals(7, recommendCount.intValue());
    cachingRecommender.recommend(2, 1, rescorer);
    assertEquals(7, recommendCount.intValue());

    // until you switch Rescorers
    cachingRecommender.recommend(1, 1, null);
    assertEquals(8, recommendCount.intValue());
    cachingRecommender.recommend(2, 1, null);
View Full Code Here


    cachingRecommender.recommend(2, 1, rescorer);
    assertEquals(7, recommendCount.intValue());

    // until you switch Rescorers
    cachingRecommender.recommend(1, 1, null);
    assertEquals(8, recommendCount.intValue());
    cachingRecommender.recommend(2, 1, null);
    assertEquals(9, recommendCount.intValue());

    cachingRecommender.refresh(null);
    cachingRecommender.estimatePreference(1, 1);
View Full Code Here

    // until you switch Rescorers
    cachingRecommender.recommend(1, 1, null);
    assertEquals(8, recommendCount.intValue());
    cachingRecommender.recommend(2, 1, null);
    assertEquals(9, recommendCount.intValue());

    cachingRecommender.refresh(null);
    cachingRecommender.estimatePreference(1, 1);
    assertEquals(10, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
View Full Code Here

    cachingRecommender.recommend(2, 1, null);
    assertEquals(9, recommendCount.intValue());

    cachingRecommender.refresh(null);
    cachingRecommender.estimatePreference(1, 1);
    assertEquals(10, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
  }
View Full Code Here

    cachingRecommender.refresh(null);
    cachingRecommender.estimatePreference(1, 1);
    assertEquals(10, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
  }

}
View Full Code Here

    cachingRecommender.estimatePreference(1, 1);
    assertEquals(10, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
    cachingRecommender.estimatePreference(1, 2);
    assertEquals(11, recommendCount.intValue());
  }

}
View Full Code Here

    verify( response ).setContentType( eq( TEST_MIME_TYPE ) );

    final int expected = new Long( new File( PentahoSystem.getApplicationContext()
      .getSolutionPath( "system/tmp/" + resource ) ).length() ).intValue();
    assertEquals( expected, fileLength.intValue() );
    verify( response ).setContentLength( eq( expected ) );
  }

  @Test
  public void testParentPath() throws ServletException, IOException {
View Full Code Here

    public IteratorOfIterables(final List<Iterable<T>> iterables) {
        final MutableInt ind = new MutableInt(0);
        initialize(new Iterator<Iterable<T>>() {
            @Override
            public boolean hasNext() {
                return ind.intValue() < iterables.size();
            }

            @Override
            public Iterable<T> next() {
                Iterable<T> next = iterables.get(ind.intValue());
View Full Code Here

                return ind.intValue() < iterables.size();
            }

            @Override
            public Iterable<T> next() {
                Iterable<T> next = iterables.get(ind.intValue());
                ind.increment();
                return next;
            }

            @Override
View Full Code Here

   * @return Returns personal player score
   */
  public int getPlayerScore(Player player)
  {
    MutableInt points = score.get(player.getObjectId());
    return points.intValue();
  }

  /**
   * Paralyzes everybody in instance to prevent any actions while event is !isActive
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.