LikeMode.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.monitor.sdk.constants;


  21. /**
  22.  * LikeMode
  23.  *
  24.  * @author Poli Andrea (apoli@link.it)
  25.  * @author $Author$
  26.  * @version $Rev$, $Date$
  27.  */
  28. public enum LikeMode {

  29.     ANYWHERE(org.openspcoop2.generic_project.expression.LikeMode.ANYWHERE),
  30.     EXACT(org.openspcoop2.generic_project.expression.LikeMode.EXACT),
  31.     END(org.openspcoop2.generic_project.expression.LikeMode.END),
  32.     START(org.openspcoop2.generic_project.expression.LikeMode.START);

  33.     private org.openspcoop2.generic_project.expression.LikeMode likeGenericProjectValue;
  34.    
  35.     public org.openspcoop2.generic_project.expression.LikeMode getLikeGenericProjectValue() {
  36.         return this.likeGenericProjectValue;
  37.     }

  38.     LikeMode(org.openspcoop2.generic_project.expression.LikeMode likeGenericProjectValue){
  39.         this.likeGenericProjectValue = likeGenericProjectValue;
  40.     }
  41.    
  42.     public static String[] toEnumNameArray(){
  43.         String[] res = new String[LikeMode.values().length];
  44.         int i=0;
  45.         for (LikeMode tmp : LikeMode.values()) {
  46.             res[i]=tmp.name();
  47.             i++;
  48.         }
  49.         return res;
  50.     }



  51.    
  52.     @Override
  53.     public String toString(){
  54.         return this.name();
  55.     }
  56.     public boolean equals(String esito){
  57.         if(esito==null) {
  58.             return false;
  59.         }
  60.         return this.toString().equals(esito);
  61.     }

  62. }