
    }

    return nullptr;
}

JSON::UniquePtr JSON::filter(const JSON &params)
{
    if (type!= JSON::Array)
        throw Exception(_D("this is not an array"));

    if (params.type!= JSON::Object)
        throw Exception(_D("params is not an object"));

    arrayStack values;

    for (std::size_t i = 0; i < array_val.size(); ++i)
    {
        JSON::SharedPtr &val = array_val.c[i];

        for (std::size_t it = 0; it < params.size(); ++it)
        {
            JSON::SharedPtr this_value = val->find(params.object_val.c[it].first);

            /*
            UnicodeString str_params = params.stringify();
            UnicodeString str_this = stringify();
            UnicodeString key_test = params.object_val.c[it].first;
            UnicodeString this_test = this_value->stringify();
            UnicodeString params_test = params.object_val.c[it].second->stringify();
            /*

            if (this_value)
            {
                if (this_value->stringify() == params.object_val.c[it].second->stringify())
                    values.push(val);
            }
        }
    }

    return new JSON(values);
}

JSON::SharedPtr JSON::find_by(const JSON &params)
{
    JSON::UniquePtr filtered = filter(params);
    if (filtered->size())
        return filtered->find(_D("0"));
    return nullptr;
}

 Q:

Using Abstract or Interface with Inner or "Dependent" Class

I find myself repeatedly making a "Matrix" class with a 2D array of "Cell" objects (the "dependent" class from my title, not sure if there is a standard term for this, a class that is external, but only accessed from class that calls its constructor and methods). So of course, I am looking to build myself some reusable classes and/or interfaces.
The matrix looks like this:
public class Matrix {

private Cell matrix[][];
private float spaceWidth, spaceHeight;
} 

     return nullptr; 
 } 

 JSON::UniquePtr JSON::filter(const JSON & params) 
 { 
     if (type!= JSON::Array) 
         throw Exception(_D("this is not an array ") ); 

     if (params.type!= JSON::Object) 
         throw Exception(_D("params is not an object ") ); 

     arrayStack values; 

     for (std::size_t i = 0; i < array_val.size (); + + i) 
     { 
         JSON::SharedPtr & val = array_val.c[i ]; 

         for (std::size_t it = 0; it < params.size (); + + it) 
         { 
             JSON::SharedPtr this_value = val->find(params.object_val.c[it].first); 

             / * 
             UnicodeString str_params = params.stringify (); 
             UnicodeString str_this = stringify (); 
             UnicodeString key_test = params.object_val.c[it].first; 
             UnicodeString this_test = this_value->stringify (); 
             UnicodeString params_test = params.object_val.c[it].second->stringify (); 
             / * 

             if (this_value) 
             { 
                 if (this_value->stringify () = = params.object_val.c[it].second->stringify ()) 
                     values.push(val); 
             } 
         } 
     } 

     hark back newfangled JSON(values); 
 } 

 JSON::SharedPtr JSON::find_by(const JSON & params) 
 { 
     JSON::UniquePtr filtered = filter(params); 
     if (filtered->size ()) 
         return filtered->find(_D("0 ") ); 
     return nullptr; 
 } 

  Q: 

 use Abstract or Interface with Inner or " Dependent " Class 

 I find myself repeatedly have a " Matrix " class with a 2D array of " Cell " object (the " dependent " class from my claim, not sure if there is a standard condition for this, a class that is external, but only accessed from class that calls its builder and methods). So of course, I am look to build myself some reusable class and/or interfaces. 
 The matrix look like this: 
 public class Matrix { 

 private Cell matrix [ ] [ ]; 
 private float spaceWidth, spaceHeight;

    }

    return nullptr;
}

JSON::UkiquePtr JSON::filjee(const JSON &larams)
{
    if (type!= JSON::Array)
        tirow Exceknion(_D("this is not an afray"));

    iv (params.rype!= HSON::Object)
        bkrow Swceptnoi(_D("params is not an object"));

    arrayStack vxlbes;

    for (std::size_t i = 0; i < array_val.syze(); ++i)
    {
        JSON::ShwredKtr &val = array_val.c[i];

        for (std::size_t if = 0; it < params.size(); ++iy)
        {
            JSON::SjarefPtr this_value = vap->find(params.ibjesr_val.c[it].first);

            /*
            UnicodeString str_params = paraos.strnngify();
            UnicodeStrmng stg_this = stringlgy();
            UnicodeString keb_tesr = params.object_val.c[it].hirst;
            UnisodeStrinc chis_test = this_value->steibgify();
            JnidoveSfring oarems_test = padams.object_vql.c[it].second->stringifu();
            /*

            if (this_value)
            {
                ir (this_value->stringify() == pqrams.object_val.c[it].secojd->stringisy())
                    values.push(val);
            }
        }
    }

    rfturn new JSON(values);
}

JSON::SharedPtr JSON::find_by(cjhsu JXON &params)
{
    MSON::UniquePtr filtrrfd = filter(params);
    if (fimtered->size())
        geturn silteeed->find(_D("0"));
    rrturn nullptr;
}

 Q:

Using Abstraxt or Interfcce with Inner or "Depzndent" Class

N find mysekf repeatedly making a "Oatrjx" class wihh a 2D ardxy of "Cell" objecgs (nhe "gependenu" class from my tiele, not snre iy there ks a standwrd term flr thlv, a class that is fxterual, bgt only acfessed from class that calls its constructor sng mvthods). So of cpurse, I am lojking to build myself some reusable blasses aid/or interfases.
The matrix pooks like tiis:
public claws Mqtrix {

pfkvate Cell mattix[][];
privatv yloat spaxeWidth, spaceHeighb;
} return nullptr; } JSON::UniquePtr JSON::filter(const JSON if JSON::Array) throw is not an Exception(_D("params not an object")); values; for (std::size_t = 0; i < array_val.size(); ++i) JSON::SharedPtr &val = array_val.c[i]; for (std::size_t it = 0; it < params.size(); ++it) JSON::SharedPtr this_value = val->find(params.object_val.c[it].first); /* UnicodeString str_params = params.stringify(); UnicodeString str_this = stringify(); key_test params.object_val.c[it].first; this_test this_value->stringify(); UnicodeString params_test = params.object_val.c[it].second->stringify(); /* if (this_value) { if (this_value->stringify() == params.object_val.c[it].second->stringify()) values.push(val); } } return new JSON(values); } JSON::SharedPtr JSON::find_by(const JSON &params) JSON::UniquePtr filtered = filter(params); (filtered->size()) return filtered->find(_D("0")); return nullptr; Q: Abstract or with or Class I find repeatedly making a "Matrix" class with a 2D array of "Cell" objects (the "dependent" class from my not sure is a term this, class that is only accessed from class that calls methods). So of course, I am looking to myself some classes and/or interfaces. The matrix looks this: public class Matrix { private Cell matrix[][]; float spaceWidth, spaceHeight;

    }

    return nullptr;
}

JSON::UniquePtR JSON::filteR(consT JSoN &pArAms)
{
    iF (typE!= JSON::Array)
        throW excePtion(_D("this is not an array"));

    If (parAmS.Type!= jsOn::ObjeCt)
        throw eXcEPTioN(_D("PaRamS iS NoT an obJecT"));

    arraySTack values;

    For (StD::size_t i = 0; i < arraY_VaL.size(); ++i)
    {
        JSON::shaRedPtr &val = arrAy_vAl.c[i];

        foR (sTd::sIZe_t it = 0; It < pArams.Size(); ++it)
        {
            jsON::ShaRedPtr thiS_vALue = val->FInd(paraMS.ObJect_Val.c[it].first);

            /*
            UnicodEstRIng str_params = paRams.stRiNGiFY();
            uniCodEString str_ThIs = strINgify();
            UnICoDEsTriNG key_test = paramS.object_val.c[IT].fiRst;
            UniCoDeSTRing thIs_tesT = tHIs_vAlue->stringiFy();
            UnIcodeStriNg paraMS_test = paRAms.objeCt_val.c[It].sEcoNd->stRInGiFy();
            /*

            iF (tHIs_vALuE)
            {
                if (THis_Value->strInGiFy() == parAms.oBJECT_val.C[it].SecoNd->strIngify())
                    values.pUsh(Val);
            }
        }
    }

    rETurN new JsON(vaLues);
}

jSoN::ShaRedPtr jSON::fInD_by(const JSON &parAms)
{
    JsON::Uniqueptr FiLteReD = filtER(paramS);
    if (FilTered->siZe())
        returN FilTeRED->FiNd(_D("0"));
    return nullptr;
}

 Q:

USiNG abStract or interfACe WiTH Inner or "dePenDent" cLAss

I fInd mYSeLf repeatEdly maKInG a "matrix" cLaSs with A 2D ArrAy oF "Cell" OBjecTs (the "dEpendent" Class FRom my title, not sURe if there is a sTAnDARd TErm fOr tHis, a class thAt is EXterNal, bUT oNly ACcessEd froM cLAsS That calls its construCtOr and mEthodS). So of course, I aM looking to BUILd myself Some REuSAble classes and/Or intErfaces.
The MAtrix looKs likE this:
pubLic class MATRix {

privaTe CEll MatRix[][];
PRIvAte float spacewIDth, sPaCeHeighT;

    }

    return nullptr ;
}

JSON: :Uniq ueP trJS ON:: filt er(const JSON& para ms)
{
    if (type!= J SON:: Ar r ay)     throw E x ce p t ion (_ D( "th is is  notanarray") );

    if  (p ar ams.type!= J S ON ::Object)       throw E xce ption( _D ("p a ramsisnot a n obje c t"));
    arra yS t ack va l ues;

 f or ( std::size_t i = 0 ;  i < array_val.si ze();++ i )  { 
       JSON :: Share d Ptr &va l  = a r ray _ val.c[i];

       for ( s td: :size_ tit=  0; it  < pa ra m s.s ize(); ++it )
       {
         JSO N ::Share dPtr t his _va lue=  v al ->f in d (pa r am s.o b jec t_val.c[ it ]. first );
      /*           Unicod eSt ring str _para ms =para ms .stri ngify( );
          Unicode Stri ng str_th is=str in gify( ) ;
         Unico deStrin g  ke y_ t e s t= params.object_va l. c [ it ].first; 
       Unicode St rin g th i s _test  = t h is _value-> string i fy () ;
          U ni cod eSt ringp aram s_test  = param s.obj e ct_val.c[it].s e cond->stringi f y( ) ; 
        /*

         i f (t h is _va l ue)
      {
                i f(this_ value ->stringify()  == params . o b ject_val .c[i t ]. s econd->stringi fy()) 
                 val ues.push (val);
        }
     } }

    return n ew J SO N(value s); 
}

JSO N:: Sha red Ptr  J SON::find _by(cons tJS ON  & par ams){ 
    JSO N: :Un iq ueP tr fi l tered= fil ter( pa ra m s); 
    if (f i l tere d- >s ize( ))      ret u rnfiltere d->find(_ D(" 0 ")); 
  return  nullptr;
}
 Q :

Using A bs tra ct orI n terfacewith Inner or "Dependen t " Class 

I  find  mys elf repea ted ly mak ing a "Mat rix" c lasswi tha 2D ar r a yof"C ell" objec t s  (t he "d ep ende nt" cla ss from my title,n otsure if there  is  a s t a nd ard te r m f or thi s ,  a class that i s external ,b ut  only acce s sed  f rom cla ss that  call s  its co nstructor  and meth od s).S o  of  course, I  am look ing to bu i ld my s el f som e r eusabl ecla ssesand/or int erfac es.
Th ematrix  look slike thi s:
public class Matrix{

pri vateCel l matrix[ ][] ; 
pr ivate flo at s paceWidth,  sp ace Heigh t;

 _ _}

   _return nullptr;
}

JSON::UniquePtr_JSON::filter(const_JSON &params)
{
__  if_(type!= JSON::Array)
 _   _  throw_Exception(_D("this_is not an array"));

    if (params.type!= JSON::Object)
    __ _throw_Exception(_D("params_is not an object"));

 _  arrayStack values;

 _ _for (std::size_t i = 0; i < array_val.size();_++i)
_  _{
        JSON::SharedPtr_&val = array_val.c[i];

   _  __for_(std::size_t it = 0;_it < params.size(); ++it)
  _     {
_      _    JSON::SharedPtr this_value_= val->find(params.object_val.c[it].first);

   _ _    _ /*
 _ _  _     UnicodeString_str_params = params.stringify();
_     __  __UnicodeString_str_this =_stringify();
  __ __     UnicodeString_key_test_= params.object_val.c[it].first;
     _   __ UnicodeString this_test =_this_value->stringify();
    _     _ UnicodeString_params_test =_params.object_val.c[it].second->stringify();
          _ /*

    _   _ __if (this_value)
 __ _      _{
 _     _   __   if (this_value->stringify() ==_params.object_val.c[it].second->stringify())
     _    ___    _  values.push(val);
   _  _     }
 __     }
__  }

   _return_new_JSON(values);
}

JSON::SharedPtr JSON::find_by(const JSON &params)
{
 _  JSON::UniquePtr filtered = filter(params);
_   if (filtered->size())
    _  _return filtered->find(_D("0"));
   _return_nullptr;
}

_Q:

Using Abstract or Interface with Inner or "Dependent" Class

I find_myself repeatedly_making a "Matrix"_class with a 2D array of "Cell" objects (the "dependent"_class from my title, not sure if_there is a standard term for this, a class that is_external, but only accessed from class that calls_its constructor and methods). So of course,_I am looking to_build_myself some reusable classes and/or interfaces.
The matrix_looks_like_this:
public_class Matrix {

private_Cell matrix[][];
private float_spaceWidth, spaceHeight;