Object lastItem = sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0] == RETURN)
/** * {@inheritDoc} */ @Override public String toString() { String str = TYPE2_VOCABULARY.get(getKey()); if (str == null) { str = TYPE1_VOCABULARY.get(getKey()); } if (str == null) { return getKey().toString() + '|'; } return str + '|'; }
Object lastItem = sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0] == RETURN)
Object lastItem = sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0] == RETURN)
parse(subrBytes, globalSubrIndex, localSubrIndex, false); Object lastItem=sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0] == 11) parse(subrBytes, globalSubrIndex, localSubrIndex, false); Object lastItem=sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0]==11)
parse(subrBytes, globalSubrIndex, localSubrIndex, false); Object lastItem=sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0] == 11) parse(subrBytes, globalSubrIndex, localSubrIndex, false); Object lastItem=sequence.get(sequence.size()-1); if (lastItem instanceof CharStringCommand && ((CharStringCommand)lastItem).getKey().getValue()[0]==11)
private static Integer removeInteger(List<Object> sequence) throws IOException { Object item = sequence.remove(sequence.size() - 1); if (item instanceof Integer) { return (Integer)item; } CharStringCommand command = (CharStringCommand) item; // div if (command.getKey().getValue()[0] == 12 && command.getKey().getValue()[1] == 12) { int a = (Integer) sequence.remove(sequence.size() - 1); int b = (Integer) sequence.remove(sequence.size() - 1); return b / a; } throw new IOException("Unexpected char string command: " + command.getKey()); }
/** * {@inheritDoc} */ @Override public String toString() { String str = TYPE2_VOCABULARY.get(getKey()); if (str == null) { str = TYPE1_VOCABULARY.get(getKey()); } if (str == null) { return getKey().toString() + '|'; } return str + '|'; }
/** * {@inheritDoc} */ @Override public String toString() { String str = TYPE2_VOCABULARY.get(getKey()); if (str == null) { str = TYPE1_VOCABULARY.get(getKey()); } if (str == null) { return getKey().toString() + '|'; } return str + '|'; }
private static Integer removeInteger(List<Object> sequence) throws IOException { Object item = sequence.remove(sequence.size() - 1); if (item instanceof Integer) { return (Integer)item; } CharStringCommand command = (CharStringCommand) item; // div if (command.getKey().getValue()[0] == 12 && command.getKey().getValue()[1] == 12) { int a = (Integer) sequence.remove(sequence.size() - 1); int b = (Integer) sequence.remove(sequence.size() - 1); return b / a; } throw new IOException("Unexpected char string command: " + command.getKey()); }
/** * {@inheritDoc} */ @Override public boolean equals(Object object) { if (object instanceof CharStringCommand) { CharStringCommand that = (CharStringCommand) object; return getKey().equals(that.getKey()); } return false; }
private void writeCommand(CharStringCommand command) { int[] value = command.getKey().getValue(); for (int aValue : value) { output.write(aValue); } }
/** * {@inheritDoc} */ @Override public String toString() { return Arrays.toString(getValue()); }
/** * {@inheritDoc} */ @Override public String toString() { return Arrays.toString(getValue()); }
/** * Constructor with an array as values. * * @param values array of values */ public Key(int[] values) { setValue(values); }
/** * Constructor with two values. * * @param b0 value1 * @param b1 value2 */ public CharStringCommand(int b0, int b1) { setKey(new Key(b0, b1)); }
/** * {@inheritDoc} */ @Override public boolean equals(Object object) { if (object instanceof CharStringCommand) { CharStringCommand that = (CharStringCommand) object; return getKey().equals(that.getKey()); } return false; }
/** * Constructor with an array as values. * * @param values array of values */ public CharStringCommand(int[] values) { setKey(new Key(values)); }
/** * Constructor with one value. * * @param b0 value */ public CharStringCommand(int b0) { setKey(new Key(b0)); }
/** * {@inheritDoc} */ @Override public int hashCode() { return getKey().hashCode(); }