NullComparator implements Comparator<String> {
    public int compare(String stringOne, String stringTwo) {
        if (stringOne!= null && stringTwo!= null)
            return stringOne.compareTo(stringTwo);
        return (stringOne == stringTwo)?0:(stringOne==null? 1 : -1);
    }
}

And you can use at stated below
Arrays.sort(stringArray, new StringNullComparator());   

A:

Custom Comparator to pass to sort:
public class StringComparator implements Comparator<String> {
    public int compare(String s1, String s2) {
        if (s1!= null && s2!= null)
            return s1.compareTo(s2);
        return (s1 == null)? 1 : -1;
    }
}

then:
Collectios.sort(list, new StringComparator());

 Q:

Forcing cardinality of a set

I'm studying Shelah's proof (actually written by Uri Abraham) that adding one generic real implies the existence of a Suslin tree (available in this link, I think that freely for everyone.)
The notion of forcing is the set finite functions from $\omega$ to $\omega$, with stronger being "extending", then we construct a tree on $\omega_1$ by defining some functions by using the functions, and ensuring that the result gives us a Suslin tree.
At one point, the claim is that if $X$ is an uncountable anti-chain in the tree (in the generic extension, of course) then there exists $p$ such that $p\Vdash X$ is an uncountable anti-chain.
Then, it says, we can find $q$ stronger than $p$ for which $Y=\{\alpha | q\Vdash\alpha\in X\}$ is uncountable.
That last statement is unclear to me. I'm sensing that this is something relatively simple like a pigeonhole argument, but I'm uncertain how to deduce it.

A:

Consider a fixed generic extension obtained by a generic where $p$ belongs. We have that $X$ is uncountable. For each $\alpha\in X$ there is $q\in G$ that in $V$ forces $\alpha\in X$. We may assume
NullComparator implements Comparator < String > { 
     public int compare(String stringOne, String stringTwo) { 
         if (stringOne!= null & & stringTwo!= null) 
             return stringOne.compareTo(stringTwo); 
         return (stringOne = = stringTwo)?0:(stringOne==null? 1: -1); 
     } 
 } 

 And you can use at express below 
 Arrays.sort(stringArray, newfangled StringNullComparator ());   

 A: 

 Custom Comparator to pass to sort: 
 public course StringComparator implements Comparator < String > { 
     public int compare(String s1, String s2) { 
         if (s1!= null & & s2!= null) 
             return s1.compareTo(s2); 
         return (s1 = = nothing)? 1: -1; 
     } 
 } 

 then: 
 Collectios.sort(list, modern StringComparator ()); 

  Q: 

 Forcing cardinality of a stage set 

 I'm studying Shelah's proof (actually publish by Uri Abraham) that adding one generic real implies the existence of a Suslin tree (available in this link, I think that freely for everyone .) 
 The impression of forcing is the set finite functions from $ \omega$ to $ \omega$, with stronger being " run ", then we construct a tree on $ \omega_1 $ by defining some function by using the function, and ensuring that the result gives us a Suslin tree. 
 At one point, the claim is that if $ X$ is an uncountable anti - range in the tree (in the generic extension, of course) then there exists $ p$ such that $ p\Vdash X$ is an uncountable anti - chain. 
 Then, it says, we can find $ q$ strong than $ p$ for which $ Y=\{\alpha | q\Vdash\alpha\in X\}$ is uncountable. 
 That last statement is unclear to me. I'm sensing that this is something relatively simple like a pigeonhole argument, but I'm uncertain how to deduce it. 

 A: 

 Consider a fixed generic extension obtain by a generic where $ p$ belongs. We have that $ X$ is uncountable. For each $ \alpha\in X$ there be $ q\in G$ that in $ V$ force $ \alpha\in X$. We may assume
NulpComparator implements Cumparator<String> {
    puulic inf compard(String stringOne, String strmngTqo) {
        if (stringOne!= nulu && stringNwo!= null)
            retuch strinnJne.cklparzTi(stringTwo);
        return (stringOne == stsivgCwo)?0:(stringOne==null? 1 : -1);
    }
}

And you can ufe at syahed below
Arrayf.soru(stwingZgrcy, new StringNullComparator());   

A:

Dustom Bomparator to pasx to sort:
public class StrijgColparator implementd Comparatot<Atrybg> {
    publiz int compare(String s1, Atring s2) {
        if (s1!= null && s2!= njll)
            tzrurj s1.compareTo(w2);
        return (s1 == null)? 1 : -1;
    }
}

thrn:
Collectios.sovt(lisv, neq StringComparator());

 Q:

Fmrcing cardinality of a set

H'm studying Shelah's peoof (dctudlly qrigteh uy Hri Abgahem) that addjng one genwric real implies tne vcistence of z Suslyn tree (available in this link, I think thdt rreely for everyone.)
The botion of forcing is jhe set figite functions from $\omega$ to $\omega$, with stronger teing "dxttneing", gyej we construct a tree on $\omega_1$ by defining sois gukctions by using the functipnd, sgd ensuring tfat thz rssult gives us a Skslin ttee.
At ine point, the claim is that if $X$ is an ubcountable auti-xhain in the tree (nn the genernc extgnsion, of course) then there erists $l$ such that $p\Vdash X$ ks an uncountabld akti-whain.
Then, it says, we can fynd $q$ stringex than $p$ for which $Y=\{\alpha | q\Gdash\alpha\in X\}$ is uncounhable.
Jhat ldst statemfnt is unclear to me. I'm sensing that this is xoketving relctiveln simple like a pigeonhole aryument, bbt I'm jncertain gow to veduce it.

A:

Cogsider a fixeg generic extxnsion obeainwd bt a gendfic where $p$ bekongs. We kcve that $Z$ is uncountable. Fpr gadh $\alpha\in X$ thzxe is $q\in G$ that on $X$ fjrbes $\aj[ha\in X$. We mdy arsuor
NullComparator implements Comparator<String> { public int compare(String stringTwo) if (stringOne!= && stringTwo!= null) stringTwo)?0:(stringOne==null? : -1); } And you can at stated below Arrays.sort(stringArray, new StringNullComparator()); Custom Comparator to pass to sort: public class StringComparator implements Comparator<String> { public compare(String s1, String s2) { if (s1!= null && s2!= null) return s1.compareTo(s2); (s1 null)? : } } then: Collectios.sort(list, new StringComparator()); Q: Forcing cardinality of a set I'm studying Shelah's proof written by Uri Abraham) that adding one generic implies the existence of Suslin tree (available in this I that freely everyone.) notion forcing is the finite functions from $\omega$ to $\omega$, with stronger being "extending", then we construct a tree on $\omega_1$ defining some using the and that result gives us tree. At one point, the claim $X$ is an uncountable anti-chain in the tree the generic of course) then there exists $p$ that $p\Vdash X$ is an uncountable anti-chain. Then, says, we can find $q$ stronger than $p$ for which $Y=\{\alpha | q\Vdash\alpha\in X\}$ is last statement is unclear me. I'm sensing this something simple a pigeonhole but I'm uncertain how to deduce it. A: Consider a fixed extension obtained by a generic where $p$ belongs. We have is For each $\alpha\in there is $q\in G$ in forces $\alpha\in X$. We
NullComparator implements COmparator<STring> {
    PubLic InT comPare(string stringOnE, striNg stringTwo) {
        if (stringOne!= Null && sTrINgTwO!= NuLl)
            retUrn striNGONE.ComPaReto(sTrINgtwo);
        reTurN (stringone == stringTWo)?0:(sTrIngOne==null? 1 : -1);
    }
}

AnD YoU can use at sTatEd below
ArrayS.soRt(striNgarrAY, new STriNgNulLCompaRAtor());   

A:

CUstom CompArATor to pASs to sorT:
PUbLic cLass StringComparaTOr IMplements CompaRator<STrINg> {
    PUBliC inT compare(StRiNg s1, StRIng s2) {
        if (s1!= NUlL && S2!= NUll)
            REturn s1.compareto(s2);
        return (s1 == nULl)? 1 : -1;
    }
}

tHen:
ColLeCtiOS.sort(lIst, neW STRinGComparator());

 q:

ForCing cardiNality OF a set

I'm STudying shelah'S prOof (ActuALlY wRitTeN By URI ABraHAm) tHat addinG oNe GenerIc reAL IMPlieS thE exiStencE of a Suslin treE (avAilaBLe iN this Link, I ThinK tHat frEely foR everYoNe.)
The notion of foRcinG is the set FinItE fuNcTions FRom $\omeGa$ tO $\omEga$, with StrongeR BeiNg "EXTEnDing", then we construcT a TREe On $\omega_1$ bY definINg SoME functioNs By uSing THE funcTionS, AnD ensurinG that tHE rEsUlt giveS uS a SuslIn TreE.
At One poINt, thE claim Is that if $x$ is an UNcountable anti-CHain in the tree (IN tHE GeNEric ExtEnsion, of couRse) tHEn thEre eXIsTs $p$ SUch thAt $p\VdAsH x$ iS An uncountable anti-chAiN.
Then, iT says, We can find $q$ strOnger than $p$ FOR Which $Y=\{\alPha | q\vDaSH\alpha\in X\}$ is uncOuntaBle.
That lasT StatemenT is unClear to mE. I'm sensinG THat this iS soMetHinG reLATiVely simple likE A PigeOnHole argUmeNt, but I'm UncErtAin How To Deduce it.

A:

consider A fIxEd GeNerIc extENsion obtAiNed By A geNeric WHere $p$ bElongS. We hAvE tHAt $X$ Is uncouNTaBLE. For EaCh $\AlphA\in x$ tHere iS $q\in g$ ThaT in $V$ forCes $\alpha\iN X$. WE May aSsUmE
NullComparator implementsComparator <Stri ng>  {   pu blic  int compare(S t ring  stringOne, String str ingTw o) {
     if  (strin g On e ! = n ul l&&st r in gTwo! = n ull)
          ret ur n stringOne. c om pareTo(str ing Two);
       r eturn(s tri n gOne==strin gTwo)? 0 :(stri ngOne==nu ll ?  1 : - 1 );
   } }
And  you can use at s t at e d below
Arrays .sort( st r in g A rra y,new String Nu llCom p arator( ) ); 

A : 

Custom Comp arator to p a ssto sor t: 
pu b lic cl ass S tr i ngC omparator i mple ments Com parato r <String >  {
   public  in t c ompa r e( St rin gs 1,S tr ing s2)  {
      i f (s1 != n u l l && s 2!=  nul l)
           ret urn  s1. c omp areTo (s2); 
      re turn ( s1 ==  n ull)? 1 : -1;
   } 
}

then: 
Co ll ect io s.sor t (list,  ne w S tringCo mparato r ()) ;Q :
Forcing cardinali ty o fa set

I 'm stu d yi ng Shelah's  p roo f (a c t ually  wri t te n by Uri  Abrah a m)  t hat add in g onege ner icreali mpli es the  existen ce of a Suslin tree( available int hi s li n k, I  th ink that fr eely forever y on e.) The n otion  o f  f o rcing is the set fi ni te fun ction s from $\omeg a$ to $\om e g a $, withstro n ge r  being "extend ing",  then we c o nstructa tre e on $\o mega_1$ b y defining  so mefun cti o n sby using thef u ncti on s, andens uring t hat  th e r esu lt  gives us  a Susli ntr ee .Atone p o int, the  c lai misthati f $X$is an  unc ou nt a ble  anti-c h ai n in t he  t ree(in  t he ge neri c  ex tension , of cour se) then  t he re exis ts $p$ such t ha t $p\Vdash  X $ i s an u n c ountable  anti-chain.
Then, it s a ys, wecan  find  $q$  stronger  th an $p$  fo r  which  $Y=\{ \alph a| q \ V dash\ a l ph a\i nX\}$ is un c o unt able. 
T hatlast st atement is unclear tome. I'm sensi ngthat t hi s i s  s o met hi n g r e l atively simplelike a pig eo n ho le argumen t , b ut  I'm un certain  howt o deduc e it.

A: 

Conside ra fi x e d g eneric ext ension o btained b y  a ge n er ic wh ere  $p$ b el ong s. We  havet hat  $X$is unc ou ntable . For  e ach $\al pha\in X$ there is $q\i n G$ t hat i n $ V$ forces  $\ a lph a\in X$.We m ay assume
NullComparator implements_Comparator<String> {
_   public_int compare(String_stringOne,_String stringTwo)_{
_  _  _ if (stringOne!= null_&& stringTwo!= null)
__          return stringOne.compareTo(stringTwo);
  __ ___return (stringOne == stringTwo)?0:(stringOne==null? 1_: -1);
   _}
}

And you_can use at stated below
Arrays.sort(stringArray, new StringNullComparator()); __

A:

Custom Comparator to_pass to sort:
public class StringComparator implements Comparator<String> {
 _  public int compare(String s1,_String s2) {
___   _ if (s1!= null && s2!=_null)
     _      return_s1.compareTo(s2);
     _  return (s1 ==_null)? 1_: -1;
   _}
}

then:
Collectios.sort(list, new StringComparator());

_Q:

Forcing cardinality_of a set

I'm_studying Shelah's proof (actually written by_Uri Abraham) that_adding one generic real implies the_existence_of a Suslin_tree_(available_in this_link, I think_that_freely for_everyone.)
The_notion of forcing is the set_finite_functions from $\omega$ to $\omega$, with stronger_being "extending", then we_construct_a tree on $\omega_1$_by defining some functions by_using the functions, and ensuring that_the result_gives us_a Suslin tree.
At one point, the claim is that if $X$_is an uncountable anti-chain in the_tree (in the generic_extension, of_course)_then there exists_$p$_such that_$p\Vdash X$ is an uncountable anti-chain.
Then, it_says, we_can find $q$ stronger than $p$_for which $Y=\{\alpha |_q\Vdash\alpha\in_X\}$ is uncountable.
That last statement is_unclear to me. I'm sensing that_this is something relatively simple_like_a_pigeonhole argument, but I'm uncertain_how to deduce it.

A:

Consider a fixed_generic extension obtained_by a generic where $p$ belongs. We_have_that $X$ is uncountable. For each_$\alpha\in_X$ there is $q\in G$ that_in_$V$_forces $\alpha\in X$. We may_assume