本文整理了Java中org.apache.directory.api.util.Strings.toLowerCase()
方法的一些代码示例,展示了Strings.toLowerCase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Strings.toLowerCase()
方法的具体详情如下:
包路径:org.apache.directory.api.util.Strings
类名称:Strings
方法名:toLowerCase
[英]Rewrote the toLowercase method to improve performances. In Ldap, attributesType are supposed to use ASCII chars : 'a'-'z', 'A'-'Z', '0'-'9', '.' and '-' only.
Deprecated : Use #toLowerCaseAscii(String)
[中]重写toLowercase方法以提高性能。在Ldap中,AttributeType应该使用ASCII字符:“a'-'z',“a'-'z',“0'-'9',”只有“-”。
不推荐使用:使用#toLowerCaseAscii(字符串)
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
/**
* {@inheritDoc}
*/
public boolean select( Viewer viewer, Object parentElement, Object element )
{
if ( element instanceof ObjectClass )
{
ObjectClass ocd = ( ObjectClass ) element;
Collection<String> lowerCaseIdentifiers = SchemaUtils.getLowerCaseIdentifiers( ocd );
for ( String s : lowerCaseIdentifiers )
{
if ( Strings.toLowerCase( s ).startsWith( Strings.toLowerCase( filterText.getText() ) ) )
{
return true;
}
}
}
return false;
}
}
代码示例来源:origin: org.apache.directory.studio/connection.core
/**
* Gets the masked attributes.
*
* @return the masked attributes
*/
private Set<String> getMaskedAttributes()
{
Set<String> maskedAttributes = new HashSet<String>();
String maskedAttributeString = ConnectionCorePlugin.getDefault().getPluginPreferences().getString(
ConnectionCoreConstants.PREFERENCE_MODIFICATIONLOGS_MASKED_ATTRIBUTES );
String[] splitted = maskedAttributeString.split( "," ); //$NON-NLS-1$
for ( String s : splitted )
{
maskedAttributes.add( Strings.toLowerCase( s ) );
}
return maskedAttributes;
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
/**
* Gets a Map containing all the Attribute Value Editors.
*
* @return
* a Map containing all the Attribute Value Editors
*/
public Map<String, String> getAttributeValueEditorMap()
{
if ( attributeValueEditorCache == null )
{
attributeValueEditorCache = new HashMap<String, String>();
AttributeValueEditorRelation[] relations = getAttributeValueEditorRelations();
for ( int i = 0; i < relations.length; i++ )
{
if ( relations[i].getAttributeNumericOidOrType() != null )
{
attributeValueEditorCache.put( Strings.toLowerCase( relations[i].getAttributeNumericOidOrType() ),
relations[i].getValueEditorClassName() );
}
}
}
return attributeValueEditorCache;
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
/**
* Gets a Map containing all the Syntax Value Editors.
*
* @return
* a Map containing all the Syntax Value Editors
*/
public Map<String, String> getSyntaxValueEditorMap()
{
if ( syntaxValueEditorCache == null )
{
syntaxValueEditorCache = new HashMap<String, String>();
SyntaxValueEditorRelation[] relations = getSyntaxValueEditorRelations();
for ( int i = 0; i < relations.length; i++ )
{
if ( relations[i].getSyntaxOID() != null )
{
syntaxValueEditorCache.put( Strings.toLowerCase( relations[i].getSyntaxOID() ), relations[i]
.getValueEditorClassName() );
}
}
}
return syntaxValueEditorCache;
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
if ( atd.getOid() != null && attributeValueEditorMap.containsKey( Strings.toLowerCase( atd.getOid() ) ) )
return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( Strings.toLowerCase( atd
.getOid()
) ) );
for ( String name : names )
if ( attributeValueEditorMap.containsKey( Strings.toLowerCase( name ) ) )
.get( attributeValueEditorMap.get( Strings.toLowerCase( name ) ) );
Map<String, String> syntaxValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
.getSyntaxValueEditorMap();
if ( syntaxNumericOid != null && syntaxValueEditorMap.containsKey( Strings.toLowerCase( syntaxNumericOid ) ) )
.toLowerCase( syntaxNumericOid ) ) );
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* Sets the User Provided ID as a byte[]
*
* @param upId The User Provided ID
* @param attributeType The asscoiated AttributeType
*/
public void setUpId( byte[] upId, AttributeType attributeType )
{
byte[] trimmed = Strings.trim( upId );
if ( Strings.isEmpty( trimmed ) && ( attributeType == null ) )
{
throw new IllegalArgumentException( I18n.err( I18n.ERR_13235_NULL_ID_WITH_NULL_AT_NOT_ALLOWED ) );
}
String newId = Strings.toLowerCase( trimmed );
setUpIdInternal( Strings.utf8ToString( upId ), newId, attributeType );
}
代码示例来源:origin: org.apache.directory.studio/connection.core
/**
* Gets the simple normalized form of the LDAP URL: schema, host and port.
*
* @param url the LDAP URL
*
* @return the simple normalized form of the LDAP URL
*/
public static String getSimpleNormalizedUrl( LdapUrl url )
{
return url.getScheme()
+ ( url.getHost() != null ? Strings.toLowerCase( url.getHost() ) : "" ) + ":" + url.getPort(); //$NON-NLS-1$ //$NON-NLS-2$
}
代码示例来源:origin: org.apache.directory.api/api-ldap-model
/**
* Sets the User Provided ID as a byte[]
*
* @param upId The User Provided ID
* @param attributeType The asscoiated AttributeType
*/
public void setUpId( byte[] upId, AttributeType attributeType )
{
byte[] trimmed = Strings.trim( upId );
if ( Strings.isEmpty( trimmed ) && ( attributeType == null ) )
{
throw new IllegalArgumentException( I18n.err( I18n.ERR_13235_NULL_ID_WITH_NULL_AT_NOT_ALLOWED ) );
}
String newId = Strings.toLowerCase( trimmed );
setUpIdInternal( Strings.utf8ToString( upId ), newId, attributeType );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* Sets the User Provided ID as a byte[]
*
* @param upId The User Provided ID
* @param attributeType The asscoiated AttributeType
*/
public void setUpId( byte[] upId, AttributeType attributeType )
{
byte[] trimmed = Strings.trim( upId );
if ( Strings.isEmpty( trimmed ) && ( attributeType == null ) )
{
throw new IllegalArgumentException( I18n.err( I18n.ERR_13235_NULL_ID_WITH_NULL_AT_NOT_ALLOWED ) );
}
String newId = Strings.toLowerCase( trimmed );
setUpIdInternal( Strings.utf8ToString( upId ), newId, attributeType );
}
代码示例来源:origin: org.apache.directory.studio/ldifeditor
|| Strings.toLowerCase( attributeName ).startsWith(
Strings.toLowerCase( rawAttributeDescription ) ) )
代码示例来源:origin: org.apache.directory.studio/connection.core
if ( maskedAttributes.contains( Strings.toLowerCase( attributeName ) ) )
代码示例来源:origin: org.apache.directory.studio/connection.core
if ( maskedAttributes.contains( Strings.toLowerCase( attributeDescription ) ) )
内容来源于网络,如有侵权,请联系作者删除!