Example usage for java.lang Integer toString

List of usage examples for java.lang Integer toString

Introduction

In this page you can find the example usage for java.lang Integer toString.

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Integer 's value.

Usage

From source file:com.silverpeas.importExport.control.PublicationImportExport.java

/**
 * Add nodes (coordinatesId) to a publication.
 * @param pubPK//  ww  w. j  a v  a2 s .  c o  m
 * @param nodes List of coordinateId.
 */
public static void addNodesToPublication(PublicationPK pubPK, List<Integer> nodes) {
    for (Integer coordinateId : nodes) {
        getPublicationBm().addFather(pubPK, new NodePK(coordinateId.toString(), pubPK));
    }
}

From source file:com.openappengine.utility.ObjectConverter.java

/**
 * Converts Integer to String.//from  w  w w.j  ava2 s . c o m
 * @param value The Integer to be converted.
 * @return The converted String value.
 */
public static String integerToString(Integer value) {
    return value.toString();
}

From source file:com.bluexml.xforms.controller.navigation.NavigationSessionListener.java

/**
 * Gets the page id.//from  w  w w.  j  a v  a 2  s.  c  o  m
 * 
 * @param sessionId
 *            the session id
 * 
 * @return the page id
 */
public static String getPageId(String sessionId) {
    Map<String, NavigationPath> pages = getNavigationPathFromSession(sessionId);
    Integer i = pages.size();
    do {
        i++;
    } while (pages.get(i.toString()) != null);
    return i.toString();
}

From source file:es.emergya.consultas.RecursoConsultas.java

public static boolean alreadyExists(Integer integer, Long myself) {
    final Recurso getbyDispositivo = getbyDispositivo(integer.toString());
    if (getbyDispositivo == null)
        return false;
    return (!getbyDispositivo.getId().equals(myself));
}

From source file:jef.testbase.JefTester.java

static List<String> printArray(List<String> oList, List<Integer> printList) {
    Integer more = printList.remove(0);
    List<String> result = new ArrayList<String>();
    if (oList.size() == 0) {
        result.add(more.toString());
    } else {//from   w w  w  .  j a v  a  2s .c o  m
        for (int i = 0; i < oList.size(); i++) {
            String str = oList.get(i);
            for (int j = 0; j < str.length(); j++) {
                String rStr = str.substring(0, j) + more + str.substring(j, str.length());
                result.add(rStr);
            }
        }
    }
    if (printList.size() == 0)
        return result;
    else
        return printArray(result, printList);
}

From source file:gov.nih.nci.ess.sr.ISO21090Helper.java

public static final II II(Integer i) {
    return i != null ? II(i.toString()) : II((String) null);
}

From source file:gov.nih.nci.ess.sr.ISO21090Helper.java

public static final ST ST(Integer i) {
    return i != null ? ST(i.toString()) : ST((String) null);
}

From source file:io.undertow.server.handlers.session.URLRewritingSessionTestCase.java

@BeforeClass
public static void setup() {
    final PathParameterSessionConfig sessionConfig = new PathParameterSessionConfig();
    final SessionAttachmentHandler handler = new SessionAttachmentHandler(new InMemorySessionManager(""),
            sessionConfig);// w w  w  . j av  a  2s .  c  o  m
    handler.setNext(new HttpHandler() {
        @Override
        public void handleRequest(final HttpServerExchange exchange) throws Exception {
            final SessionManager manager = exchange.getAttachment(SessionManager.ATTACHMENT_KEY);
            Session session = manager.getSession(exchange, sessionConfig);
            if (session == null) {
                session = manager.createSession(exchange, sessionConfig);
                session.setAttribute(COUNT, 0);
            } else {
                Assert.assertEquals("/notamatchingpath;jsessionid=" + session.getId(),
                        exchange.getRequestURI());
            }
            Integer count = (Integer) session.getAttribute(COUNT);
            exchange.getResponseHeaders().add(new HttpString(COUNT), count.toString());
            session.setAttribute(COUNT, ++count);

            for (Map.Entry<String, Deque<String>> qp : exchange.getQueryParameters().entrySet()) {
                exchange.getResponseHeaders().add(new HttpString(qp.getKey()), qp.getValue().getFirst());
            }
            if (exchange.getQueryString().isEmpty()) {
                exchange.getResponseSender().send(sessionConfig.rewriteUrl(
                        DefaultServer.getDefaultServerURL() + "/notamatchingpath", session.getId()));
            } else {
                exchange.getResponseSender().send(sessionConfig.rewriteUrl(
                        DefaultServer.getDefaultServerURL() + "/notamatchingpath?" + exchange.getQueryString(),
                        session.getId()));
            }
        }
    });
    DefaultServer.setRootHandler(handler);
}

From source file:it.unibas.spicygui.Utility.java

public static Image getImageNumber(Integer number) {
    String stringNumber = number.toString();
    int count = stringNumber.length();
    Image image = null;//from   w  ww  .j a  v a 2  s.c om
    for (int i = count; i >= 1; i--) {
        char c = stringNumber.charAt(i - 1);
        int numero = Integer.parseInt(String.valueOf(c));
        if (i == count) {
            image = buildImage(numero);
        } else {
            image = mergeImage(numero, image);
        }
    }
    return image;
}

From source file:de.cismet.lagis.cidsmigtest.StandartTypToStringTester.java

/**
 * DOCUMENT ME!//from www .  j  a v  a 2 s  . co m
 *
 * @param   object  DOCUMENT ME!
 *
 * @return  DOCUMENT ME!
 */
public static String getStringOf(final Integer object) {
    if (object == null) {
        return null;
    } else {
        return "(Integer) " + object.toString();
    }
}