public boolean equals(Object o) { if( o instanceof StringValue ) { StringValue r = (StringValue)o; return StringUtil.equals(value, r.value); } return false; } public int getValueType() {
protected boolean accept( Object object ) { Definition d = (Definition)object; return StringUtil.equals(d.uri, namespaceURI); } }) {
public static boolean contains(Object[] objects, Object toTest) { if (objects != null) { for (int i = 0; i < objects.length; i++) { if (equals(objects[i], toTest)) { return true; } } } return false; }
public static boolean contains(Object[] objects, Object toTest) { if (objects != null) { for (int i = 0; i < objects.length; i++) { if (equals(objects[i], toTest)) { return true; } } } return false; }
/** * @ibm-api */ public static boolean parseBoolean(String value) { return StringUtil.equals(value,"True"); // $NLS-Converter.true.1-1$ }
/** * @ibm-api */ public static boolean parseBoolean(String value) { return StringUtil.equals(value,"True"); // $NLS-Converter.true.1-1$ }
public boolean hasRuntime(String runtime) { if(runtimes!=null && runtime.length()>=1) { for(int i=0; i<runtimes.length; i++) { if(StringUtil.equals(runtime, runtimes[i])) { return true; } } return false; } return true; }
/** * Determines if an Attribute is a namespace attribute. */ public static boolean isNamespaceAttribute( Attr attribute ){ boolean rtnVal = false; String prefix = attribute.getPrefix(); if ( StringUtil.equals( prefix, "xmlns") == true) { // $NON-NLS-1$ rtnVal = true; } return rtnVal; }
@Override public boolean matches(Object object) { List<Object> res = DataNavigator.this.xpath(object,path,TYPE_STRING); for(int i=0; i<res.size(); i++) { if(StringUtil.equals((String)res.get(i), value)) { return true; } } return false; } });
/** * Get the prefix for the specified Namespace URI in this namespace context. * @fbscript */ public String getPrefix(String namespaceURI) { for( Iterator it=definitions.values().iterator(); it.hasNext(); ) { Definition d = (Definition)it.next(); if( StringUtil.equals(d.uri, namespaceURI) ) { return d.prefix; } } return null; }
public boolean isFeatureEnabled (String featureId){ if(StringUtil.equals(featureId, ENABLE_ADVSTATEMGR)) { return true; } return super.isFeatureEnabled(featureId); }
public boolean isFeatureEnabled (String featureId){ if(StringUtil.equals(featureId, ENABLE_ADVSTATEMGR)) { return true; } return super.isFeatureEnabled(featureId); }
ProfilerAggregator get(ProfilerType type, String param) { int childCount = children.size(); for( int i=0; i<childCount; i++ ) { ProfilerAggregator pa = children.get(i); if( pa.type==type ) { if( StringUtil.equals(param, pa.getParam()) ) { return pa; } } } return null; }
public Property getPropertyByName(String name) { if(properties!=null) { for(int i=0; i<properties.length; i++) { Property p = properties[i]; if(StringUtil.equals(p.getName(), name)) { return p; } } } return null; } public String getPropertyValueByName(String name) {
private static int countMatch(String source, char match) { int count=0; if(StringUtil.isNotEmpty(source)) { for(int i=0; i<source.length(); i++) { if(StringUtil.equals(source.charAt(i), match)) { count++; } } } return count; }
ProfilerAggregator get(ProfilerType type, String param) { int childCount = children.size(); for( int i=0; i<childCount; i++ ) { ProfilerAggregator pa = children.get(i); if( pa.type==type ) { if( StringUtil.equals(param, pa.getParam()) ) { return pa; } } } return null; }
private static void writeExceptionMessage(PrintWriter printWriter, Throwable t) { printWriter.println("<br/><h2>"+"Exception"+"</h2>"); String lastMessage = null; // Do not duplicate messages... for (Throwable tt=t; tt != null; tt = getCause(tt)) { String s = tt.getLocalizedMessage(); if (StringUtil.isNotEmpty(s) && !StringUtil.equals(lastMessage, s)) { printWriter.print("<span class=\"row\">"+s+"</span>"); printWriter.println("<br/>"); lastMessage = s; } } }
public static boolean isContainedWithin(String s, String[] container) { if(isNotEmpty(s) && isNotEmpty(container)) { for(int i = 0; i < container.length; i++) { if(equals(s, container[i])) { return true; } } } return false; }
public static boolean isContainedWithin(String s, String[] container) { if(isNotEmpty(s) && isNotEmpty(container)) { for(int i = 0; i < container.length; i++) { if(equals(s, container[i])) { return true; } } } return false; }
@Override protected boolean isHeaderAllowed(String headerName) throws ServletException { // Don't pass the basic authorization as this must be set by the endpoint if(StringUtil.equals(headerName,"Authorization")) { return false; } if(!(this.getEndpoint().isHeaderAllowed(headerName, requestURI))){ return false; } // And pass all the other headers return super.isHeaderAllowed(headerName); }