MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / parse

Method parse

src/main/java/trace/graphics/PlyReader.java:64–75  ·  view source on GitHub ↗
(Scanner scanner)

Source from the content-addressed store, hash-verified

62 public InvalidPlyFormatException(String message) {
63 super(message);
64 }
65 }
66
67
68 enum Type {
69 CHAR {
70 @Override
71 public Number parse(Scanner scanner) throws IOException {
72 try {
73 int value=scanner.nextInt();
74 if (value<-Byte.MIN_VALUE || value>Byte.MAX_VALUE) throw new InputMismatchException("Char out of range");
75 return value;
76 } catch (InputMismatchException e) {
77 throw new InvalidPlyFormatException("Cannot parse '"+scanner.next()+"' as char", e);
78 } catch (NoSuchElementException e) {

Callers

nothing calls this directly

Calls 5

nextIntMethod · 0.80
nextLongMethod · 0.80
nextMethod · 0.65
nextFloatMethod · 0.45
nextDoubleMethod · 0.45

Tested by

no test coverage detected