Organizing a String based on maxlength of each field

Posted by pringlesinn on Stack Overflow See other posts from Stack Overflow or by pringlesinn
Published on 2010-12-22T12:43:09Z Indexed on 2010/12/22 12:54 UTC
Read the original article Hit count: 223

Filed under:
|

I've made a program that makes my life easier by reading a class and creating methods like these below:

//Ferramentas Parâmetros 
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Pesquisa", "ppaParametrosList", null, TipoAcessoBean.TELA));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Gravar", "ppaParametrosHome", "persist", TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Atualizar Dados", "ppaParametrosHome", "update", TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Leitura", "ppaParametrosHome", "find", TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Excluir", "ppaParametrosHome", "remove", TipoAcessoBean.ACAO));

Don't worry about the language. It won't make it harder to understand what I need to make. I want to organize it to be shown like this:

//Ferramentas Parâmetros 
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Pesquisa"       , "ppaParametrosList", null     , TipoAcessoBean.TELA));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Gravar"         , "ppaParametrosHome", "persist", TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Atualizar Dados", "ppaParametrosHome", "update" , TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Leitura"        , "ppaParametrosHome", "find"   , TipoAcessoBean.ACAO));
acessos.add(new AcessoBean("Ferramentas", "Parâmetros", "Parâmetros", "Excluir"        , "ppaParametrosHome", "remove" , TipoAcessoBean.ACAO));

I'm reading the whole class with Scanner, but once I read, I save only the things I want in a Collection containing this things above. How can I make a method to complete with blank to make it organized?

© Stack Overflow or respective owner

Related posts about java

Related posts about string