All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.simulationconstructionset.gui.config.EntryBoxGroup Maven / Gradle / Ivy

There is a newer version: 0.25.2
Show newest version
package us.ihmc.simulationconstructionset.gui.config;

import java.util.ArrayList;

public class EntryBoxGroup
{
   private String name;
   private ArrayList variables = new ArrayList<>();
   private ArrayList regularExpressions = new ArrayList<>();

   public EntryBoxGroup(String name)
   {
      this.name = name;
   }

   public void setName(String name)
   {
      this.name = name;
   }

   public String getName()
   {
      return name;
   }

   public void addVar(String varName)
   {
      variables.add(varName);
   }

   public void addEntryBoxVars(String[] varNames)
   {
      for (int i = 0; i < varNames.length; i++)
      {
         variables.add(varNames[i]);
      }
   }

   public void addEntryBoxRegularExpressions(String[] regularExpNames)
   {
      for (int i = 0; i < regularExpNames.length; i++)
      {
         regularExpressions.add(regularExpNames[i]);
      }
   }

   public void removeEntryBoxVar(String varName)
   {
      variables.remove(varName);
   }

   public String[] getEntryBoxVars()
   {
      String[] ret = new String[variables.size()];

      variables.toArray(ret);

      return ret;
   }

   public String[] getEntryBoxRegularExpressions()
   {
      String[] ret = new String[regularExpressions.size()];

      regularExpressions.toArray(ret);

      return ret;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy