本文整理汇总了Java中java.util.UnknownFormatFlagsException类的典型用法代码示例。如果您正苦于以下问题:Java UnknownFormatFlagsException类的具体用法?Java UnknownFormatFlagsException怎么用?Java UnknownFormatFlagsException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnknownFormatFlagsException类属于java.util包,在下文中一共展示了UnknownFormatFlagsException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
private static Flags parse(char c) {
switch (c) {
case '-':
return LEFT_JUSTIFY;
case '#':
return ALTERNATE;
case '+':
return PLUS;
case ' ':
return LEADING_SPACE;
case '0':
return ZERO_PAD;
case ',':
return GROUP;
case '(':
return PARENTHESES;
case '<':
return PREVIOUS;
default:
throw new UnknownFormatFlagsException(String.valueOf(c));
}
}
示例2: retrieveGravityState
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
@Override
protected ISelectionGravityState retrieveGravityState(int gravityAttribute) {
switch (gravityAttribute) {
case HorizontalLoopBarView.SELECTION_GRAVITY_START:
return new StartGravityState();
case HorizontalLoopBarView.SELECTION_GRAVITY_END:
return new EndGravityState();
default:
throw new UnknownFormatFlagsException("unknown gravity Attribute = " + gravityAttribute + ". Should be one of SELECTION_GRAVITY");
}
}
示例3: retrieveGravityState
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
@Override
protected ISelectionGravityState retrieveGravityState(int gravityAttribute) {
switch (gravityAttribute) {
case HorizontalLoopBarView.SELECTION_GRAVITY_START:
return new TopGravityState();
case HorizontalLoopBarView.SELECTION_GRAVITY_END:
return new BottomGravityState();
default:
throw new UnknownFormatFlagsException("unknown gravity Attribute = " + gravityAttribute + ". Should be one of SELECTION_GRAVITY");
}
}
示例4: retrieveGravityState
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
@Override
protected ISelectionGravityState retrieveGravityState(int gravityAttribute) {
switch (gravityAttribute) {
case LoopBarView.SELECTION_GRAVITY_START:
return new TopGravityState();
case LoopBarView.SELECTION_GRAVITY_END:
return new BottomGravityState();
default:
throw new UnknownFormatFlagsException("unknown gravity Attribute = " + gravityAttribute + ". Should be one of SELECTION_GRAVITY");
}
}
示例5: retrieveGravityState
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
@Override
protected ISelectionGravityState retrieveGravityState(int gravityAttribute) {
switch (gravityAttribute) {
case LoopBarView.SELECTION_GRAVITY_START:
return new StartGravityState();
case LoopBarView.SELECTION_GRAVITY_END:
return new EndGravityState();
default:
throw new UnknownFormatFlagsException("unknown gravity Attribute = " + gravityAttribute + ". Should be one of SELECTION_GRAVITY");
}
}
示例6: parse
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
private static Flags parse(char c) {
switch (c) {
case '-': return LEFT_JUSTIFY;
case '#': return ALTERNATE;
case '+': return PLUS;
case ' ': return LEADING_SPACE;
case '0': return ZERO_PAD;
case ',': return GROUP;
case '(': return PARENTHESES;
case '<': return PREVIOUS;
default:
throw new UnknownFormatFlagsException(String.valueOf(c));
}
}
示例7: test_unknownFormatFlagsException
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
* @tests java.util.UnknownFormatFlagsException#UnknownFormatFlagsException(String)
*/
public void test_unknownFormatFlagsException() {
try {
new UnknownFormatFlagsException(null);
fail("should throw NullPointerExcepiton");
} catch (NullPointerException e) {
// expected
}
}
示例8: test_getFlags
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
* @tests java.util.UnknownFormatFlagsException#getFlags()
*/
public void test_getFlags() {
String s = "MYTESTSTRING";
UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
s);
assertEquals(s, UnknownFormatFlagsException.getFlags());
}
示例9: test_getMessage
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
* @tests java.util.UnknownFormatFlagsException#getMessage()
*/
public void test_getMessage() {
String s = "MYTESTSTRING";
UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
s);
assertNotNull(UnknownFormatFlagsException.getMessage());
}
示例10: assertDeserialized
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
public void assertDeserialized(Serializable initial,
Serializable deserialized) {
SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial,
deserialized);
UnknownFormatFlagsException initEx = (UnknownFormatFlagsException) initial;
UnknownFormatFlagsException desrEx = (UnknownFormatFlagsException) deserialized;
assertEquals("Flags", initEx.getFlags(), desrEx.getFlags());
}
示例11: testSerializationSelf
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
* @tests serialization/deserialization.
*/
public void testSerializationSelf() throws Exception {
SerializationTest.verifySelf(new UnknownFormatFlagsException(
"MYTESTSTRING"), exComparator);
}
示例12: testSerializationCompatibility
import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
* @tests serialization/deserialization compatibility with RI.
*/
public void testSerializationCompatibility() throws Exception {
SerializationTest.verifyGolden(this, new UnknownFormatFlagsException(
"MYTESTSTRING"), exComparator);
}