Renamed inner class: Mapper --> Codes.

This commit is contained in:
Simone Bordet 2012-02-24 16:52:06 +01:00
parent 04f74816b5
commit 226b180bfd
3 changed files with 11 additions and 11 deletions

View File

@ -40,7 +40,7 @@ public enum SessionStatus
*/ */
public static SessionStatus from(int code) public static SessionStatus from(int code)
{ {
return Mapper.codes.get(code); return Codes.codes.get(code);
} }
private final int code; private final int code;
@ -48,7 +48,7 @@ public enum SessionStatus
private SessionStatus(int code) private SessionStatus(int code)
{ {
this.code = code; this.code = code;
Mapper.codes.put(code, this); Codes.codes.put(code, this);
} }
/** /**
@ -59,7 +59,7 @@ public enum SessionStatus
return code; return code;
} }
private static class Mapper private static class Codes
{ {
private static final Map<Integer, SessionStatus> codes = new HashMap<>(); private static final Map<Integer, SessionStatus> codes = new HashMap<>();
} }

View File

@ -80,9 +80,9 @@ public enum StreamStatus
switch (version) switch (version)
{ {
case SPDY.V2: case SPDY.V2:
return Mapper.v2Codes.get(code); return Codes.v2Codes.get(code);
case SPDY.V3: case SPDY.V3:
return Mapper.v3Codes.get(code); return Codes.v3Codes.get(code);
default: default:
throw new IllegalStateException(); throw new IllegalStateException();
} }
@ -95,10 +95,10 @@ public enum StreamStatus
{ {
this.v2Code = v2Code; this.v2Code = v2Code;
if (v2Code >= 0) if (v2Code >= 0)
Mapper.v2Codes.put(v2Code, this); Codes.v2Codes.put(v2Code, this);
this.v3Code = v3Code; this.v3Code = v3Code;
if (v3Code >= 0) if (v3Code >= 0)
Mapper.v3Codes.put(v3Code, this); Codes.v3Codes.put(v3Code, this);
} }
/** /**
@ -118,7 +118,7 @@ public enum StreamStatus
} }
} }
private static class Mapper private static class Codes
{ {
private static final Map<Integer, StreamStatus> v2Codes = new HashMap<>(); private static final Map<Integer, StreamStatus> v2Codes = new HashMap<>();
private static final Map<Integer, StreamStatus> v3Codes = new HashMap<>(); private static final Map<Integer, StreamStatus> v3Codes = new HashMap<>();

View File

@ -33,7 +33,7 @@ public enum ControlFrameType
public static ControlFrameType from(short code) public static ControlFrameType from(short code)
{ {
return Mapper.codes.get(code); return Codes.codes.get(code);
} }
private final short code; private final short code;
@ -41,7 +41,7 @@ public enum ControlFrameType
private ControlFrameType(short code) private ControlFrameType(short code)
{ {
this.code = code; this.code = code;
Mapper.codes.put(code, this); Codes.codes.put(code, this);
} }
public short getCode() public short getCode()
@ -49,7 +49,7 @@ public enum ControlFrameType
return code; return code;
} }
private static class Mapper private static class Codes
{ {
private static final Map<Short, ControlFrameType> codes = new HashMap<>(); private static final Map<Short, ControlFrameType> codes = new HashMap<>();
} }