Examples of String


Examples of java.lang.String

  public Tag attr(String name, int value) {
    return attr(name, String.valueOf(value));
  }

  public Tag addClass(String name) {
    String cns = get().getAttrVal("class");
    String[] nms = Strings.splitIgnoreBlank(cns, " ");
    if (null == nms) {
      get().attr("class", name);
    } else {
      if (!Lang.contains(nms, name)) {
View Full Code Here

Examples of java.lang.String

    }
    return this;
  }

  public boolean hasClass(String name) {
    String cns = get().getAttrVal("class");
    if (null == cns || cns.length() < name.length())
      return false;
    return (" " + cns + " ").indexOf(" " + name + " ") != -1;
  }
View Full Code Here

Examples of java.lang.String

    private <T> void unmarshalAndMarshal(Class<T> type, java.lang.String xmlFileName, java.lang.String expectedFile) throws Exception {

        Object object = JaxbOpenejbJar2.unmarshal(type, getInputStream(xmlFileName));

        String actual = JaxbOpenejbJar2.marshal(type, object);

        if (xmlFileName.equals(expectedFile)) {
            String sourceXml = readContent(getInputStream(xmlFileName));
            assertEquals(sourceXml, actual);
        } else {
            String expected = readContent(getInputStream(expectedFile));
            assertEquals(expected, actual);
        }
    }
View Full Code Here

Examples of java.lang.String

   * get the styles which are related to parameter style
   * @param style
   * @return all Styles of the parameterList
   */
  private List<XWPFStyle> getUsedStyleList(XWPFStyle style, List<XWPFStyle> usedStyleList){
    String basisStyleID  = style.getBasisStyleID();
    XWPFStyle basisStyle = getStyle(basisStyleID);
    if((basisStyle!=null)&&(!usedStyleList.contains(basisStyle))){
      usedStyleList.add(basisStyle);
      getUsedStyleList(basisStyle, usedStyleList);
    }   
    String linkStyleID = style.getLinkStyleID();
    XWPFStyle linkStyle = getStyle(linkStyleID);
    if((linkStyle!=null)&&(!usedStyleList.contains(linkStyle))){
      usedStyleList.add(linkStyle);
      getUsedStyleList(linkStyle, usedStyleList);
    }
   
    String nextStyleID = style.getNextStyleID();
    XWPFStyle nextStyle = getStyle(nextStyleID);
    if((nextStyle!=null)&&(!usedStyleList.contains(nextStyle))){
      usedStyleList.add(linkStyle);
      getUsedStyleList(linkStyle, usedStyleList);
    }   
View Full Code Here

Examples of java.lang.String

            double max = m.get(1, 0);
            if (max != 1)
                CA = CA.times(new Matrix(new double[][]{{1/max, 0, 0},{0, 1/max, 0},{0, 0, 1/max}}));

            float actualExposure = exposure;
            String thisCamera = metadata.getCameraMake(true);
            for (String camera : fakeISO100Cameras)
                if (thisCamera.equals(camera)) {
                    if (metadata.getISO() == 100) {
                        actualExposure -= 1;
                    }
                    break;
                }
View Full Code Here

Examples of java.lang.String

      //
    }
  }
 
  public void start(BundleContext context) throws Exception{
    String propVal=new String("both");
    String propValue=context.getProperty("mosgi.jmxconsole.remotelogger.componentfilter");
    if (propValue!=null) {
      if (propValue.equals("treeonly") | propValue.equals("tableonly") | propValue.equals("both") | propValue.equals("none")) {
        propVal=propValue;
      }else {
        propVal="both";
      }
    }
View Full Code Here

Examples of java.lang.String

      // no luck with properties, let's try fields
      try {
        return FieldSupport.instance().fieldValue(propertyOrFieldName, Object.class, input);
      } catch (IntrospectionError propertyIntrospectionError) {
        // no field nor property found with given name, it is considered as an error
        String message = format(
            "\nCan't find any field or property with name '%s'.\nError when introspecting fields was :\n- %s \nError when introspecting properties was :\n- %s",
            propertyOrFieldName, fieldIntrospectionError.getMessage(), propertyIntrospectionError.getMessage());
        throw new IntrospectionError(message);
      }
    }
View Full Code Here

Examples of java.lang.String

    return o;
  }

  static String[] get_Person_roles(Connection con, int ID)
      throws SQLException {
    String q = "SELECT roles FROM Person_roles WHERE Person_ID=" + ID;
    Statement stat = con.createStatement();
    ResultSet rs = stat.executeQuery(q);
    List<String> elements = new ArrayList<String>();
    while (rs.next()) {
      elements.add(rs.getString("roles"));
View Full Code Here

Examples of java.lang.String

    return (String[]) elements.toArray(new String[0]);
  }

  static Date[] get_Person_vacation(Connection con, int ID)
      throws SQLException {
    String q = "SELECT vacation FROM Person_vacation WHERE Person_ID=" + ID;
    Statement stat = con.createStatement();
    ResultSet rs = stat.executeQuery(q);
    List<Date> elements = new ArrayList<Date>();
    while (rs.next()) {
      elements.add(rs.getDate("vacation"));
View Full Code Here

Examples of java.lang.String

//      JOptionPane.showMessageDialog(null,"EXIT");
//    else
//      JOptionPane.showMessageDialog(null,"AAAA");
    //fillGameField(3,3);
    //String command = ae.getActionCommand().toString();
    String command = ae.getActionCommand().toString();
    if(command == "Find LAN"){

    }   else if (command == "Find Air"){

    }   else if(command == "Host LAN"){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.