@Test public void keywordShouldThrowWhenFlagNameContainsLeftBracket() { expectedException.expect(IllegalArgumentException.class); Keyword.of("a["); }
public static Keyword of(String flagName) { return parse(flagName) .orElseThrow(() -> new IllegalArgumentException(VALIDATION_MESSAGE)); }
Keyword { public static Keyword of(String flagName) { return parse(flagName) .orElseThrow(() -> new IllegalArgumentException(VALIDATION_MESSAGE)); } }
Keyword { public static Keyword of(String flagName) { return parse(flagName) .orElseThrow(() -> new IllegalArgumentException(VALIDATION_MESSAGE)); } Keyword(String flagName); }
Keyword { public static Keyword of(String flagName) { return parse(flagName) .orElseThrow(() -> new IllegalArgumentException(VALIDATION_MESSAGE)); } Keyword(String flagName); static Optional<Keyword> parse(String flagName); static Keyword of(String flagName); static Keyword fromFlag(Flags.Flag flag); String getFlagName(); boolean isExposedImapKeyword(); boolean isDraft(); Optional<Flags.Flag> asSystemFlag(); Flags asFlags(); @Override final boolean equals(Object other); @Override final int hashCode(); @Override String toString(); }
Keyword { public static Keyword of(String flagName) { return parse(flagName) .orElseThrow(() -> new IllegalArgumentException(VALIDATION_MESSAGE)); } Keyword(String flagName); static Optional<Keyword> parse(String flagName); static Keyword of(String flagName); static Keyword fromFlag(Flags.Flag flag); String getFlagName(); boolean isExposedImapKeyword(); boolean isDraft(); Optional<Flags.Flag> asSystemFlag(); Flags asFlags(); @Override final boolean equals(Object other); @Override final int hashCode(); @Override String toString(); static final Keyword DRAFT; static final Keyword SEEN; static final Keyword FLAGGED; static final Keyword ANSWERED; static final Keyword DELETED; static final Keyword RECENT; static final Keyword FORWARDED; static final String VALIDATION_MESSAGE; }