本文整理汇总了Java中gnu.trove.list.array.TCharArrayList类的典型用法代码示例。如果您正苦于以下问题:Java TCharArrayList类的具体用法?Java TCharArrayList怎么用?Java TCharArrayList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TCharArrayList类属于gnu.trove.list.array包,在下文中一共展示了TCharArrayList类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: canonicalizeInputFile
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
private static MemoryBuffer canonicalizeInputFile(MemoryBuffer buffer)
{
TCharArrayList newFile = new TCharArrayList(buffer.length());
for (int ptr = buffer.getBufferStart(), end = buffer.length(); ptr < end; ptr++)
{
char ch = buffer.getCharAt(ptr);
if (ch != ' ' && ch != '\t')
{
newFile.add(ch);
continue;
}
newFile.add(' ');
while (ptr+1 < end && (buffer.getCharAt(ptr+1) == ' ' ||
buffer.getCharAt(ptr + 1) == '\t'))
++ptr;
}
return MemoryBuffer.getMemBuffer(
new String(newFile.toArray()), buffer.getBufferName());
}
开发者ID:JianpingZeng,项目名称:xcc,代码行数:22,代码来源:FileCheck.java
示例2: longFromDigits
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
public static Long longFromDigits(CharSequence input) {
TCharArrayList digits = new TCharArrayList();
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if(Character.isDigit(c)) {
digits.add(c);
for (int j = i+1; j < input.length(); j++) {
final char nc = input.charAt(j);
if(Character.isDigit(nc)) {
digits.add(nc);
} else {
break;
}
}
break;
}
}
if(digits.isEmpty()) {
return null;
}
return Long.parseLong(new String(digits.toArray()));
}
开发者ID:jjfiv,项目名称:chai,代码行数:23,代码来源:StrUtil.java
示例3: TCharArrayStack
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
/**
* Creates a new <code>TCharArrayStack</code> instance that is
* a copy of the instanced passed to us.
*
* @param stack the instance to copy
*/
public TCharArrayStack( TCharStack stack ) {
if ( stack instanceof TCharArrayStack ) {
TCharArrayStack array_stack = ( TCharArrayStack ) stack;
this._list = new TCharArrayList( array_stack._list );
} else {
throw new UnsupportedOperationException( "Only support TCharArrayStack" );
}
}
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TCharArrayStack.java
示例4: readExternal
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
public void readExternal( ObjectInput in )
throws IOException, ClassNotFoundException {
// VERSION
in.readByte();
// LIST
_list = ( TCharArrayList ) in.readObject();
}
开发者ID:JianpingZeng,项目名称:xcc,代码行数:10,代码来源:TCharArrayStack.java
示例5: readExternal
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
@Override
public void readExternal( ObjectInput in )
throws IOException, ClassNotFoundException {
// VERSION
in.readByte();
// LIST
_list = ( TCharArrayList ) in.readObject();
}
开发者ID:palantir,项目名称:trove-3.0.3,代码行数:11,代码来源:TCharArrayStack.java
示例6: UShortMapTidList
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
public UShortMapTidList(Counters c) {
for (int i = 0; i <= c.getMaxFrequent(); i++) {
int count = c.getDistinctTransactionsCount(i);
if (count > 0) {
this.occurrences.put(i, new TCharArrayList(count));
}
}
}
开发者ID:slide-lig,项目名称:TopPI,代码行数:9,代码来源:UShortMapTidList.java
示例7: clone
import gnu.trove.list.array.TCharArrayList; //导入依赖的package包/类
@Override
public TidList clone() {
UShortMapTidList o = (UShortMapTidList) super.clone();
o.occurrences = new TIntObjectHashMap<TCharList>(this.occurrences.size());
TIntObjectIterator<TCharList> iter = this.occurrences.iterator();
while (iter.hasNext()) {
iter.advance();
o.occurrences.put(iter.key(), new TCharArrayList(iter.value()));
}
return o;
}
开发者ID:slide-lig,项目名称:TopPI,代码行数:12,代码来源:UShortMapTidList.java
注:本文中的gnu.trove.list.array.TCharArrayList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论