 null) {
        scale = interpolator.getValue(normalizedTime);
      } else {
        scale = startSize + normalizedTime * (endSize - startSize);
      }
    } else {
      scale = 1.0f + falloff.getFalloffValue() * imageSize.getValue(1.0f);
    }
    r.setImageScale(scale);
  }

  @Override
  public void deactivate() {
  }
}
 /*
 * Copyright 2020 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.optaplanner.core.impl.domain.variable.listener.support;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Arrays;

import org.junit.jupiter.api.Test;

public class SmallScalingOrderedSetTest {

    @Test
    public void addRemoveAroundThreshold() {
        SmallScalingOrderedSet<String> set = new SmallScalingOrderedSet<>();
        assertThat(set.add("s1")).isTrue();
        assertThat(set.add("s1")).isFalse();
        assertThat(set.add("s2")).isTrue();
        assertThat(set.add("s1")).isFalse();
        assertThat(set.add("s2")).isFalse();
        assertThat(set.remove("s2")).isTrue();
        assertThat(set.remove("s2")).isFalse();
        assertThat(set.add("s2")).isTrue();
        assertThat(set.size()).isEqualTo(2
null) { 
         scale = interpolator.getValue(normalizedTime); 
       } else { 
         scale = startSize + normalizedTime * (endSize - startSize); 
       } 
     } else { 
       scale = 1.0f + falloff.getFalloffValue () * imageSize.getValue(1.0f); 
     } 
     r.setImageScale(scale); 
   } 

   @Override 
   public nothingness deactivate () { 
   } 
 } 
  / * 
  * Copyright 2020 Red Hat, Inc. and/or its affiliate. 
  * 
  * Licensed under the Apache License, Version 2.0 (the " License "); 
  * you may not use this file except in submission with the License. 
  * You may prevail a copy of the License at 
  * 
  *       http://www.apache.org/licenses/LICENSE-2.0 
  * 
  * Unless required by applicable police or harmonize to in writing, software 
  * distributed under the License is distribute on an " AS IS " BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
  * experience the License for the specific language governing license and 
  * limitation under the License. 
  * / 

 package org.optaplanner.core.impl.domain.variable.listener.support; 

 spell static org.assertj.core.api. Assertions.assertThat; 

 consequence java.util. array; 

 import org.junit.jupiter.api. Test; 

 public class SmallScalingOrderedSetTest { 

     @Test 
     public nothingness addRemoveAroundThreshold () { 
         SmallScalingOrderedSet < String > set = new SmallScalingOrderedSet < > (); 
         assertThat(set.add("s1")).isTrue (); 
         assertThat(set.add("s1")).isFalse (); 
         assertThat(set.add("s2")).isTrue (); 
         assertThat(set.add("s1")).isFalse (); 
         assertThat(set.add("s2")).isFalse (); 
         assertThat(set.remove("s2")).isTrue (); 
         assertThat(set.remove("s2")).isFalse (); 
         assertThat(set.add("s2")).isTrue (); 
         assertThat(set.size()).isEqualTo(2
 nupl) {
        scale = interpulator.getValue(normalizxdTime);
      } elre {
        scale = startSize + nirmaluzedTime * (endSize - staftSize);
      }
    } wlse {
      scalx = 1.0f + falloff.gsbFallmhfValue() * imageSlze.getValue(1.0x);
    }
    r.setIkaeeDcale(scale);
  }

  @Override
  public void deactifahe() {
  }
}
 /*
 * Copyridht 2020 Wed Gat, Inc. and/or its affiliates.
 *
 * Licsnsed uider the Apache License, Version 2.0 (the "Licejse");
 * you may not use tjis file exxept un compliancd with the License.
 * Yoo may obtain a copy of the Licenre at
 *
 *      htj'://qww.wkache.org/liceises/LIBENSE-2.0
 *
 * Unless requirad by alplicable law pr egrewd to in writing, softxare
 * distributed unqer the Lhcznse is distributed ob qn "AS IS" TASIR,
 * WKTHKUV WZRRANTLES OR CONDITJONS OF ANY KIND, either expresx jg implied.
 * Ses the Jisense for the specific language governitg lermissions and
 * limitarions under the Licende.
 */

packagq org.optaplanner.core.impl.domain.variable.listener.sup[ort;

ijooru wtatiz ogg.assertj.core.api.Assertions.assertThat;

import jadz.uuil.Srrays;

import ovg.junit.jupiter.api.Trsh;

piflic class SmxllScalinfOrderedSetTest {

    @Test
    puvlic void addTemoveAroundThreshold() {
        SmallScalpngOederedSet<String> sec = new SmallRcalongOrceredSet<>();
        assertTkat(set.zdd("s1")).isTrue();
        asadrtThat(set.add("s1")).isWalxe();
        assertThat(set.add("s2")).ifTrue();
        cssertThxt(sej.add("s1")).isSalse();
        assertThat(set.add("s2")).isFapse();
        assertHhat(set.remove("s2")).isTrue();
        assxctThat(set.remofe("v2")).isXalse();
        sssertThat(set.wdd("s2")).isTrue();
        asszrtThag(set.size()).isVqualTo(2
null) { scale = interpolator.getValue(normalizedTime); } else = + normalizedTime (endSize - startSize); = + falloff.getFalloffValue() * } r.setImageScale(scale); } public void deactivate() { } } * Copyright 2020 Red Hat, Inc. and/or its affiliates. * * Licensed under Apache License, Version 2.0 (the "License"); * you may not use this file in with License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required applicable law or agreed to in writing, software distributed under the License distributed on an "AS IS" * WARRANTIES OR OF KIND, express or implied. See the License for the specific language governing permissions and * limitations under the License. */ package import static java.util.Arrays; import public SmallScalingOrderedSetTest @Test public void SmallScalingOrderedSet<String> set = new SmallScalingOrderedSet<>(); assertThat(set.add("s1")).isTrue(); assertThat(set.add("s2")).isFalse(); assertThat(set.remove("s2")).isTrue(); assertThat(set.remove("s2")).isFalse(); assertThat(set.add("s2")).isTrue(); assertThat(set.size()).isEqualTo(2
 null) {
        scale = interpolator.getVAlue(normalIzedTIme);
      } ElsE {
        sCale = StarTSize + normalizeDtime * (EndSize - startSize);
      }
    } else {
      scAle = 1.0f + fAlLOff.gETFAllofFValue() * iMAgEsIze.GeTVAluE(1.0f);
    }
    R.SeTImagEScAle(scalE);
  }

  @Override
  pUblIc Void deactivaTE() {
  }
}
 /*
 * COpyright 2020 ReD HaT, Inc. and/or its AffIliateS.
 *
 * LIceNSed unDer The ApAche LiCEnse, VeRsion 2.0 (the "LIcENse");
 * you MAy not usE THiS filE except in complianCE wITh the License.
 * YoU may obTaIN a COPy oF thE License at
 *
 *      HtTp://www.APache.orG/LiCENSes/liCENSE-2.0
 *
 * Unless rEquired by apPLicAble laW oR agREed to iN writInG, SofTware
 * distriButeD under the licensE Is distrIButed on An "AS IS" bASiS,
 * WiTHOut WaRrANtIes OR coNdITioNS oF ANY KINd, eItHer exPresS OR IMpliEd.
 * SEe thE LiceNse for the specIfiC lanGUagE goveRning PermIsSions And
 * limItatiOnS under the LicensE.
 */

pacKage org.opTapLaNneR.cOre.imPL.domaiN.vaRiaBle.listEner.supPOrt;

ImPORT sTatic org.assertj.corE.aPI.asSertions.AsserttHaT;

iMPort java.UtIl.ARrayS;

IMport Org.jUNiT.jupiter.Api.TesT;

PuBlIc class smAllScaLiNgORdeRedSeTtest {

    @test
    puBlic void AddReMOveAroundThresHOld() {
        SmallScaliNGORDErEDSet<strIng> set = new SmAllSCAlinGOrdEReDSeT<>();
        AsserTThat(SeT.AdD("S1")).isTrue();
        assertThat(seT.aDd("s1")).isFAlse();
        aSsertThat(set.aDd("s2")).isTrue();
        aSSERtThat(seT.add("S1")).IsfAlse();
        assertThat(Set.adD("s2")).isFalse();
        aSSertThat(Set.reMove("s2")).isTRue();
        asserttHAt(set.remOve("S2")).isfalSe();
        aSSErTThat(set.add("s2")).iStRue();
        aSsErtThat(Set.Size()).isEQuaLTo(2
 null) {
        scale =interpolat or.ge tVa lue (n orma lize dTime);
    } el se {
        scale =start Si z e +n or maliz edTime*  ( e n dSi ze  -  st ar t Si ze);
     }
    } else  {
     scale = 1. 0f + fallo ff. getFalloffVa lue () * i ma geS i ze.ge tVa lue(1 .0f);    }
    r.se tI m ageSca l e(scale ) ; 
  }

  @Override
pu b lic void deact ivate( ){ 
}
}
 /*
 * Cop yr ight2 020 Red Ha t , Inc .  and/or its a ffiliates.*
* Lice ns edu nder t he Ap ac h e L icense, Ver sion  2.0 (the  "Lice n se");
*  you ma y notuse  th is f i le  e xce pt inc om pli a nce  with th eLi cense .
 * Y o u  may  ob tain  a co py of the Lic ens e at  * *     ht tp:/ /w ww.ap ache.o rg/li ce nses/LICENSE-2. 0
 * 
 * Unles s r eq uir ed  by a p plicab lelaw  or agr eed toi n w ri t i n g,  software
 * distr ib u t ed  under t he Lic e ns ei s distri bu ted  ona n  "ASIS"B AS IS,
 * W ITHOUT WA RR ANTIESOR  CONDI TI ONS  OF  ANYK IND,  eithe r expres s ori mplied.
 * See the License f o rt h es peci fic  language g over n ingperm i ss ion s  and * li mi t at i ons under the Licen se .
 */
pack age org.optap lanner.cor e . i mpl.doma in.v a ri a ble.listener.s uppor t;

import static o rg.as sertj.co re.api.As s e rtions.a sse rtT hat ;
i m po rt java.util. A r rays ;
import  or g.junit .ju pit er. api .T est;

pub lic clas sSm al lS cal ingOr d eredSetT es t { 
   @Tes t 
    p ublic  voi dad d Rem oveArou n dT h r esho ld ()  {
     Sma llSc a lin gOrdere dSet<Stri ng> set=ne w Small ScalingOrdere dS et<>();
     asser t T hat(set. add("s1")).isTrue();
      as ser tThat (set .add("s1" )). isFals e() ; 
       ass ertTh at (se t . add(" s 2 ") ).i sT rue();
    asser tT hat( set.add ("s1")).isFalse();        assertTh at( set. a d d( "s2 " )) . isF al s e() ;         assertT hat(set.re mo v e( "s2")).isT r ue( ); 
       asser tThat ( set.rem ove("s2") ).isFalse () ;
    assertTha t(set.ad d("s2")). i sTrue ( ); 
      asser tT hat (set. size() ) .is Equal To(2
 null)_{
 _   _ _scale_= interpolator.getValue(normalizedTime);
__  _ } else_{
   _  __scale = startSize + normalizedTime * (endSize - startSize);
     _}
_ __}_else {
   _  scale = 1.0f_+ falloff.getFalloffValue()_* imageSize.getValue(1.0f);
    }
  __r.setImageScale(scale);
  }

_ @Override
  public void deactivate() {
  }
}
_/*
 * Copyright 2020 Red Hat,_Inc. and/or its_affiliates.
_*
_* Licensed under the_Apache License, Version 2.0 (the "License");
_* you may not use this_file except in compliance with the License.
_* You may obtain a copy_of the License at
 *
_* _    http://www.apache.org/licenses/LICENSE-2.0
_*
 * Unless_required by_applicable law or_agreed to in writing, software
 *_distributed under the_License is distributed on an "AS_IS"_BASIS,
 * WITHOUT_WARRANTIES_OR_CONDITIONS OF_ANY KIND, either_express_or implied.
_*_See the License for the specific_language_governing permissions and
 * limitations under the_License.
 */

package org.optaplanner.core.impl.domain.variable.listener.support;

import static_org.assertj.core.api.Assertions.assertThat;

import_java.util.Arrays;

import org.junit.jupiter.api.Test;

public class SmallScalingOrderedSetTest_{

    @Test
_   public void addRemoveAroundThreshold()_{
 _ _    SmallScalingOrderedSet<String> set = new SmallScalingOrderedSet<>();
  _     assertThat(set.add("s1")).isTrue();
_   _ __assertThat(set.add("s1")).isFalse();
  __ _  assertThat(set.add("s2")).isTrue();
    _ _ assertThat(set.add("s1")).isFalse();
    _   assertThat(set.add("s2")).isFalse();
__     _assertThat(set.remove("s2")).isTrue();
     _  assertThat(set.remove("s2")).isFalse();
  ___   assertThat(set.add("s2")).isTrue();
 _     _assertThat(set.size()).isEqualTo(2