当前位置: 首页>>代码示例>>Java>>正文


Java UnknownFormatFlagsException类代码示例

本文整理汇总了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));
	}
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:23,代码来源:Flags.java

示例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");
    }
}
 
开发者ID:sinhaDroid,项目名称:BlogBookApp,代码行数:12,代码来源:OrientationStateHorizontal.java

示例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");
    }
}
 
开发者ID:sinhaDroid,项目名称:BlogBookApp,代码行数:12,代码来源:OrientationStateVertical.java

示例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");
    }
}
 
开发者ID:Cleveroad,项目名称:LoopBar,代码行数:12,代码来源:OrientationStateVerticalLeft.java

示例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");
    }
}
 
开发者ID:Cleveroad,项目名称:LoopBar,代码行数:12,代码来源:OrientationStateHorizontalBottom.java

示例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));
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:15,代码来源:F3Formatter.java

示例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
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:13,代码来源:UnknownFormatFlagsExceptionTest.java

示例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());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:10,代码来源:UnknownFormatFlagsExceptionTest.java

示例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());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:10,代码来源:UnknownFormatFlagsExceptionTest.java

示例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());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:12,代码来源:UnknownFormatFlagsExceptionTest.java

示例11: testSerializationSelf

import java.util.UnknownFormatFlagsException; //导入依赖的package包/类
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:9,代码来源:UnknownFormatFlagsExceptionTest.java

示例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);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:9,代码来源:UnknownFormatFlagsExceptionTest.java


注:本文中的java.util.UnknownFormatFlagsException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。