本文整理汇总了Java中org.ojalgo.netio.ASCII类的典型用法代码示例。如果您正苦于以下问题:Java ASCII类的具体用法?Java ASCII怎么用?Java ASCII使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ASCII类属于org.ojalgo.netio包,在下文中一共展示了ASCII类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
final StringBuilder retVal = new StringBuilder();
retVal.append(ASCII.LCB);
retVal.append(ASCII.SP);
final int tmpLength = (int) this.count();
if (tmpLength >= 1) {
retVal.append(this.get(0).toString());
for (int i = 1; i < tmpLength; i++) {
retVal.append(ASCII.COMMA);
retVal.append(ASCII.SP);
retVal.append(this.get(i).toString());
}
retVal.append(ASCII.SP);
}
retVal.append(ASCII.RCB);
return retVal.toString();
}
示例2: appendLastPartToString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
final void appendLastPartToString(final StringBuilder builder) {
if (myColour != null) {
builder.append(TypeUtils.toHexString(myColour.getRGB()));
builder.append(ASCII.NBSP);
}
if (this.size() <= 30) {
builder.append(super.toString());
} else {
builder.append("First:");
builder.append(this.firstEntry());
builder.append(ASCII.NBSP);
builder.append("Last:");
builder.append(this.lastEntry());
builder.append(ASCII.NBSP);
builder.append("Size:");
builder.append(this.size());
}
}
示例3: parse
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
/**
* @see org.ojalgo.type.context.TypeContext#parse(java.lang.String)
*/
@Override
@SuppressWarnings("unchecked")
public final T parse(final CharSequence string) {
if (string != null) {
try {
return (T) myFormat.parseObject(NBSP ? string.toString().replace(ASCII.NBSP, ASCII.SP) : string.toString());
} catch (final ParseException anException) {
return this.handleParseException(myFormat, string.toString());
}
} else {
return null;
}
}
示例4: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
final StringBuilder retVal = new StringBuilder("HW=");
retVal.append(myLevels[0].toString());
if (this.isL3Specified()) {
retVal.append(ASCII.COMMA).append(units).append("xL3:").append(myLevels[myLevels.length - 3]);
} else if (this.isL2Specified()) {
retVal.append(ASCII.COMMA).append(units).append("xL2:").append(myLevels[myLevels.length - 2]);
}
retVal.append(ASCII.COMMA).append(cores).append("cores:").append(myLevels[myLevels.length - 1]);
return retVal.toString();
}
示例5: toStringFirstPart
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
StringBuilder toStringFirstPart() {
final StringBuilder retVal = new StringBuilder();
if (myName != null) {
retVal.append(myName);
retVal.append(ASCII.NBSP);
}
return retVal;
}
示例6: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
final StringBuilder retVal = new StringBuilder();
if (myName != null) {
retVal.append(myName);
retVal.append(ASCII.NBSP);
}
if (myColour != null) {
retVal.append(TypeUtils.toHexString(myColour.getRGB()));
retVal.append(ASCII.NBSP);
}
if (this.size() <= 30) {
retVal.append(super.toString());
} else {
retVal.append("First:");
retVal.append(this.firstKey());
retVal.append(ASCII.EQUALS);
retVal.append(this.firstValue());
retVal.append(ASCII.NBSP);
retVal.append("Last:");
retVal.append(this.lastKey());
retVal.append(ASCII.EQUALS);
retVal.append(this.lastValue());
retVal.append(ASCII.NBSP);
retVal.append("Size:");
retVal.append(this.size());
}
return retVal.toString();
}
示例7: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
final StringBuilder retVal = new StringBuilder(this.getClass().getSimpleName() + '@' + Integer.toHexString(this.hashCode()));
for (final CalendarDateSeries<N> tmpSeries : this.values()) {
retVal.append(ASCII.LF);
retVal.append(tmpSeries.toString());
}
return retVal.toString();
}
示例8: format
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
/**
* Compatible with slf4j. {} in the message pattern will be replaced by the arguments.
*/
public static String format(final String messagePattern, final Object... args) {
if (messagePattern == null) {
return null;
}
final int tmpPatternSize = messagePattern.length();
final int tmpArgsCount = args.length;
int tmpFirst = 0;
int tmpLimit = tmpPatternSize;
final StringBuilder retVal = new StringBuilder(tmpPatternSize + (tmpArgsCount * 20));
for (int a = 0; a < tmpArgsCount; a++) {
tmpLimit = messagePattern.indexOf(TypeUtils.START, tmpFirst);
if (tmpLimit == -1) {
retVal.append(ASCII.SP);
retVal.append(args[a]);
} else {
retVal.append(messagePattern.substring(tmpFirst, tmpLimit));
retVal.append(args[a]);
tmpFirst = tmpLimit + 2;
}
}
retVal.append(messagePattern.substring(tmpFirst, tmpPatternSize));
return retVal.toString();
}
示例9: format
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
/**
* @see org.ojalgo.type.context.TypeContext#format(java.lang.Object)
*/
@Override
public final String format(final Object object) {
if (object != null) {
try {
if (!myConfigured) {
this.configureFormat(myFormat, object);
myConfigured = true;
}
if (NBSP) {
return myFormat.format(object).replace(ASCII.SP, ASCII.NBSP);
} else {
return myFormat.format(object);
}
} catch (final IllegalArgumentException exception) {
return this.handleFormatException(myFormat, object);
}
} else {
return null;
}
}
示例10: appendln
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
public Template appendln(final String str) {
myText.append(str);
myText.append(ASCII.LF);
return this;
}
示例11: line
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
public Template line() {
myText.append(ASCII.LF);
return this;
}
示例12: space
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
public Template space() {
myText.append(ASCII.SP);
return this;
}
示例13: tab
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
public Template tab() {
myText.append(ASCII.HT);
return this;
}
示例14: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
return super.toString() + ASCII.SP + myHardware.toString();
}
示例15: toString
import org.ojalgo.netio.ASCII; //导入依赖的package包/类
@Override
public String toString() {
return String.valueOf(key) + String.valueOf(ASCII.EQUALS) + String.valueOf(value);
}