Java 类java.util.UnknownFormatFlagsException 实例源码

项目:bazel    文件:Flags.java   
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));
    }
}
项目:BlogBookApp    文件:OrientationStateHorizontal.java   
@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");
    }
}
项目:BlogBookApp    文件:OrientationStateVertical.java   
@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");
    }
}
项目:LoopBar    文件:OrientationStateVerticalLeft.java   
@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");
    }
}
项目:LoopBar    文件:OrientationStateHorizontalBottom.java   
@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");
    }
}
项目:form-follows-function    文件:F3Formatter.java   
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));
    }
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#UnknownFormatFlagsException(String)
 */
public void test_unknownFormatFlagsException() {

    try {
        new UnknownFormatFlagsException(null);
        fail("should throw NullPointerExcepiton");
    } catch (NullPointerException e) {
        // expected
    }
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getFlags()
 */
public void test_getFlags() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertEquals(s, UnknownFormatFlagsException.getFlags());
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getMessage()
 */
public void test_getMessage() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertNotNull(UnknownFormatFlagsException.getMessage());
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
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());
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#UnknownFormatFlagsException(String)
 */
public void test_unknownFormatFlagsException() {

    try {
        new UnknownFormatFlagsException(null);
        fail("should throw NullPointerExcepiton");
    } catch (NullPointerException e) {
        // expected
    }
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getFlags()
 */
public void test_getFlags() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertEquals(s, UnknownFormatFlagsException.getFlags());
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getMessage()
 */
public void test_getMessage() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertNotNull(UnknownFormatFlagsException.getMessage());
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
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());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#UnknownFormatFlagsException(String)
 */
public void test_unknownFormatFlagsException() {

    try {
        new UnknownFormatFlagsException(null);
        fail("should throw NullPointerExcepiton");
    } catch (NullPointerException e) {
        // expected
    }
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getFlags()
 */
public void test_getFlags() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertEquals(s, UnknownFormatFlagsException.getFlags());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getMessage()
 */
public void test_getMessage() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertNotNull(UnknownFormatFlagsException.getMessage());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
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());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#UnknownFormatFlagsException(String)
 */
public void test_unknownFormatFlagsException() {

    try {
        new UnknownFormatFlagsException(null);
        fail("should throw NullPointerExcepiton");
    } catch (NullPointerException e) {
        // expected
    }
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getFlags()
 */
public void test_getFlags() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertEquals(s, UnknownFormatFlagsException.getFlags());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests java.util.UnknownFormatFlagsException#getMessage()
 */
public void test_getMessage() {
    String s = "MYTESTSTRING";
    UnknownFormatFlagsException UnknownFormatFlagsException = new UnknownFormatFlagsException(
            s);
    assertNotNull(UnknownFormatFlagsException.getMessage());
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
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());
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:In-the-Box-Fork    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:cn1    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}
项目:freeVM    文件:UnknownFormatFlagsExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new UnknownFormatFlagsException(
            "MYTESTSTRING"), exComparator);
}